From 0858188228e966bb6e9c7b83d533578e63713bb4 Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Thu, 21 Dec 2023 19:21:11 +0100 Subject: [PATCH] pre-release-notes.md: release bitcoinj 0.17 alpha 3 --- javadoc/0.17-alpha3/allclasses-index.html | 2338 +++ javadoc/0.17-alpha3/allclasses.html | 396 + javadoc/0.17-alpha3/allpackages-index.html | 291 + javadoc/0.17-alpha3/constant-values.html | 2496 +++ javadoc/0.17-alpha3/deprecated-list.html | 1708 ++ javadoc/0.17-alpha3/element-list | 23 + javadoc/0.17-alpha3/help-doc.html | 272 + javadoc/0.17-alpha3/index-all.html | 14964 ++++++++++++++++ javadoc/0.17-alpha3/index.html | 287 + javadoc/0.17-alpha3/jquery-ui.overrides.css | 35 + .../jquery/external/jquery/jquery.js | 10872 +++++++++++ .../0.17-alpha3/jquery/jquery-3.6.1.min.js | 2 + javadoc/0.17-alpha3/jquery/jquery-ui.min.css | 6 + javadoc/0.17-alpha3/jquery/jquery-ui.min.js | 6 + .../jquery/jszip-utils/dist/jszip-utils-ie.js | 56 + .../jszip-utils/dist/jszip-utils-ie.min.js | 10 + .../jquery/jszip-utils/dist/jszip-utils.js | 118 + .../jszip-utils/dist/jszip-utils.min.js | 10 + .../0.17-alpha3/jquery/jszip/dist/jszip.js | 11370 ++++++++++++ .../jquery/jszip/dist/jszip.min.js | 13 + javadoc/0.17-alpha3/legal/ASSEMBLY_EXCEPTION | 27 + javadoc/0.17-alpha3/legal/jquery.md | 72 + javadoc/0.17-alpha3/legal/jqueryUI.md | 49 + javadoc/0.17-alpha3/legal/jszip.md | 653 + javadoc/0.17-alpha3/legal/pako.md | 45 + javadoc/0.17-alpha3/member-search-index.js | 1 + javadoc/0.17-alpha3/member-search-index.zip | Bin 0 -> 45434 bytes .../org/bitcoinj/base/Address.html | 514 + .../AddressParser.AddressParserProvider.html | 283 + .../org/bitcoinj/base/AddressParser.html | 415 + .../0.17-alpha3/org/bitcoinj/base/Base58.html | 475 + .../org/bitcoinj/base/Bech32.Bech32Bytes.html | 362 + .../org/bitcoinj/base/Bech32.Bech32Data.html | 323 + .../org/bitcoinj/base/Bech32.Encoding.html | 381 + .../0.17-alpha3/org/bitcoinj/base/Bech32.html | 480 + .../org/bitcoinj/base/BitcoinNetwork.html | 856 + .../0.17-alpha3/org/bitcoinj/base/Coin.html | 1320 ++ .../base/LegacyAddress.AddressHeader.html | 428 + .../base/LegacyAddress.P2SHHeader.html | 415 + .../org/bitcoinj/base/LegacyAddress.html | 867 + .../org/bitcoinj/base/Monetary.html | 288 + .../org/bitcoinj/base/Network.html | 414 + .../org/bitcoinj/base/ScriptType.html | 590 + .../base/SegwitAddress.SegwitHrp.html | 482 + .../org/bitcoinj/base/SegwitAddress.html | 924 + .../org/bitcoinj/base/Sha256Hash.html | 881 + .../0.17-alpha3/org/bitcoinj/base/VarInt.html | 621 + ...dressFormatException.InvalidCharacter.html | 388 + ...ddressFormatException.InvalidChecksum.html | 343 + ...ressFormatException.InvalidDataLength.html | 343 + .../AddressFormatException.InvalidPrefix.html | 347 + ...matException.UnexpectedWitnessVersion.html | 342 + .../AddressFormatException.WrongNetwork.html | 349 + .../exceptions/AddressFormatException.html | 385 + .../base/exceptions/package-summary.html | 207 + .../base/exceptions/package-tree.html | 189 + .../org/bitcoinj/base/internal/Buffers.html | 463 + .../org/bitcoinj/base/internal/ByteArray.html | 445 + .../org/bitcoinj/base/internal/ByteUtils.html | 1648 ++ .../FutureUtils.ThrowingSupplier.html | 305 + .../bitcoinj/base/internal/FutureUtils.html | 398 + .../org/bitcoinj/base/internal/HexFormat.html | 323 + .../base/internal/InternalUtils.Joiner.html | 266 + .../base/internal/InternalUtils.Splitter.html | 266 + .../bitcoinj/base/internal/InternalUtils.html | 487 + .../base/internal/PlatformUtils.OS.html | 393 + .../base/internal/PlatformUtils.Runtime.html | 393 + .../bitcoinj/base/internal/PlatformUtils.html | 459 + .../bitcoinj/base/internal/Preconditions.html | 420 + .../org/bitcoinj/base/internal/Stopwatch.html | 431 + .../bitcoinj/base/internal/StreamUtils.html | 313 + .../org/bitcoinj/base/internal/TimeUtils.html | 483 + .../base/internal/package-summary.html | 273 + .../bitcoinj/base/internal/package-tree.html | 198 + .../org/bitcoinj/base/package-summary.html | 324 + .../org/bitcoinj/base/package-tree.html | 209 + .../org/bitcoinj/base/utils/Fiat.html | 798 + .../bitcoinj/base/utils/MonetaryFormat.html | 1041 ++ .../bitcoinj/base/utils/package-summary.html | 173 + .../org/bitcoinj/base/utils/package-tree.html | 162 + .../core/AbstractBlockChain.NewBlockType.html | 387 + .../org/bitcoinj/core/AbstractBlockChain.html | 1441 ++ .../org/bitcoinj/core/AddressMessage.html | 458 + .../org/bitcoinj/core/AddressV1Message.html | 402 + .../org/bitcoinj/core/AddressV2Message.html | 404 + .../org/bitcoinj/core/BaseMessage.html | 397 + ...BitcoinSerializer.BitcoinPacketHeader.html | 382 + .../org/bitcoinj/core/BitcoinSerializer.html | 801 + .../org/bitcoinj/core/Block.VerifyFlag.html | 372 + .../0.17-alpha3/org/bitcoinj/core/Block.html | 1552 ++ .../org/bitcoinj/core/BlockChain.html | 798 + .../org/bitcoinj/core/BlockLocator.html | 443 + .../core/BloomFilter.BloomUpdate.html | 398 + .../org/bitcoinj/core/BloomFilter.html | 748 + .../org/bitcoinj/core/CheckpointManager.html | 589 + .../org/bitcoinj/core/Context.html | 622 + .../org/bitcoinj/core/EmptyMessage.html | 390 + .../org/bitcoinj/core/FeeFilterMessage.html | 433 + .../org/bitcoinj/core/FilteredBlock.html | 575 + .../bitcoinj/core/FullPrunedBlockChain.html | 775 + .../org/bitcoinj/core/GetAddrMessage.html | 322 + .../org/bitcoinj/core/GetBlocksMessage.html | 537 + .../org/bitcoinj/core/GetDataMessage.html | 489 + .../org/bitcoinj/core/GetHeadersMessage.html | 445 + .../org/bitcoinj/core/HeadersMessage.html | 461 + .../core/InsufficientMoneyException.html | 390 + .../org/bitcoinj/core/InventoryItem.Type.html | 501 + .../org/bitcoinj/core/InventoryItem.html | 451 + .../org/bitcoinj/core/InventoryMessage.html | 569 + .../org/bitcoinj/core/ListMessage.html | 557 + .../bitcoinj/core/LockTime.HeightLock.html | 320 + .../org/bitcoinj/core/LockTime.TimeLock.html | 319 + .../org/bitcoinj/core/LockTime.html | 544 + .../org/bitcoinj/core/MemoryPoolMessage.html | 325 + .../org/bitcoinj/core/Message.html | 398 + .../org/bitcoinj/core/MessageSerializer.html | 670 + .../org/bitcoinj/core/NetworkParameters.html | 1935 ++ .../org/bitcoinj/core/NotFoundMessage.html | 449 + .../org/bitcoinj/core/PartialMerkleTree.html | 564 + .../0.17-alpha3/org/bitcoinj/core/Peer.html | 1829 ++ .../org/bitcoinj/core/PeerAddress.html | 707 + .../org/bitcoinj/core/PeerException.html | 321 + .../org/bitcoinj/core/PeerFilterProvider.html | 364 + .../core/PeerGroup.FilterRecalculateMode.html | 393 + .../org/bitcoinj/core/PeerGroup.html | 2717 +++ .../org/bitcoinj/core/PeerSocketHandler.html | 617 + .../0.17-alpha3/org/bitcoinj/core/Ping.html | 449 + .../0.17-alpha3/org/bitcoinj/core/Pong.html | 386 + .../org/bitcoinj/core/ProtocolException.html | 359 + .../org/bitcoinj/core/ProtocolVersion.html | 486 + .../org/bitcoinj/core/PrunedException.html | 333 + .../core/RejectMessage.RejectCode.html | 501 + .../org/bitcoinj/core/RejectMessage.html | 654 + .../core/RejectedTransactionException.html | 355 + .../org/bitcoinj/core/SendAddrV2Message.html | 324 + .../org/bitcoinj/core/SendHeadersMessage.html | 326 + .../org/bitcoinj/core/Services.html | 668 + .../org/bitcoinj/core/StoredBlock.html | 600 + .../bitcoinj/core/StoredUndoableBlock.html | 419 + .../bitcoinj/core/Transaction.Purpose.html | 468 + .../bitcoinj/core/Transaction.SigHash.html | 520 + .../org/bitcoinj/core/Transaction.html | 2848 +++ .../org/bitcoinj/core/TransactionBag.html | 334 + ...TransactionBroadcast.ProgressCallback.html | 261 + .../bitcoinj/core/TransactionBroadcast.html | 583 + .../bitcoinj/core/TransactionBroadcaster.html | 257 + .../TransactionConfidence.ConfidenceType.html | 464 + ...ctionConfidence.Listener.ChangeReason.html | 410 + .../core/TransactionConfidence.Listener.html | 290 + .../core/TransactionConfidence.Source.html | 405 + .../bitcoinj/core/TransactionConfidence.html | 953 + .../core/TransactionInput.ConnectMode.html | 380 + .../TransactionInput.ConnectionResult.html | 393 + .../org/bitcoinj/core/TransactionInput.html | 1268 ++ .../bitcoinj/core/TransactionOutPoint.html | 800 + .../org/bitcoinj/core/TransactionOutput.html | 1040 ++ .../core/TransactionOutputChanges.html | 328 + .../org/bitcoinj/core/TransactionWitness.html | 577 + .../org/bitcoinj/core/TxConfidenceTable.html | 491 + .../0.17-alpha3/org/bitcoinj/core/UTXO.html | 524 + .../org/bitcoinj/core/UTXOProvider.html | 317 + .../bitcoinj/core/UTXOProviderException.html | 332 + .../org/bitcoinj/core/UnknownMessage.html | 366 + .../0.17-alpha3/org/bitcoinj/core/Utils.html | 403 + ...cationException.BlockVersionOutOfDate.html | 322 + ...ationException.CoinbaseHeightMismatch.html | 322 + ...xception.CoinbaseScriptSizeOutOfRange.html | 322 + ...ificationException.DuplicatedOutPoint.html | 322 + ...icationException.EmptyInputsOrOutputs.html | 322 + .../VerificationException.ExcessiveValue.html | 322 + ...ationException.LargerThanMaxBlockSize.html | 322 + ...ficationException.NegativeValueOutput.html | 322 + ...cationException.NoncanonicalSignature.html | 322 + ...tionException.UnexpectedCoinbaseInput.html | 322 + .../bitcoinj/core/VerificationException.html | 409 + .../org/bitcoinj/core/VersionAck.html | 322 + .../org/bitcoinj/core/VersionMessage.html | 926 + .../core/listeners/AddressEventListener.html | 261 + .../BlockchainDownloadEventListener.html | 229 + .../BlocksDownloadedEventListener.html | 279 + .../ChainDownloadStartedEventListener.html | 269 + .../listeners/DownloadProgressTracker.html | 467 + .../core/listeners/GetDataEventListener.html | 265 + .../core/listeners/NewBestBlockListener.html | 271 + .../OnTransactionBroadcastListener.html | 254 + .../listeners/PeerConnectedEventListener.html | 260 + .../core/listeners/PeerDataEventListener.html | 244 + .../PeerDisconnectedEventListener.html | 262 + .../PeerDiscoveredEventListener.html | 258 + .../PreMessageReceivedEventListener.html | 266 + .../core/listeners/ReorganizeListener.html | 272 + .../TransactionConfidenceEventListener.html | 281 + .../TransactionReceivedInBlockListener.html | 322 + .../core/listeners/package-summary.html | 277 + .../bitcoinj/core/listeners/package-tree.html | 197 + .../org/bitcoinj/core/package-summary.html | 771 + .../org/bitcoinj/core/package-tree.html | 320 + .../org/bitcoinj/crypto/AesKey.html | 420 + ...IP38PrivateKey.BadPassphraseException.html | 295 + .../org/bitcoinj/crypto/BIP38PrivateKey.html | 510 + .../org/bitcoinj/crypto/ChildNumber.html | 671 + .../crypto/DeterministicHierarchy.html | 538 + .../org/bitcoinj/crypto/DeterministicKey.html | 1715 ++ .../org/bitcoinj/crypto/DumpedPrivateKey.html | 421 + .../bitcoinj/crypto/ECKey.ECDSASignature.html | 499 + .../crypto/ECKey.KeyIsEncryptedException.html | 305 + .../ECKey.MissingPrivateKeyException.html | 304 + .../org/bitcoinj/crypto/ECKey.html | 2246 +++ .../bitcoinj/crypto/EncodedPrivateKey.html | 458 + .../org/bitcoinj/crypto/EncryptableItem.html | 350 + .../org/bitcoinj/crypto/EncryptedData.html | 407 + .../crypto/HDDerivationException.html | 296 + .../HDKeyDerivation.PublicDeriveMode.html | 380 + .../crypto/HDKeyDerivation.RawKeyBytes.html | 328 + .../org/bitcoinj/crypto/HDKeyDerivation.html | 575 + .../org/bitcoinj/crypto/HDPath.html | 953 + .../org/bitcoinj/crypto/HDUtils.html | 307 + .../org/bitcoinj/crypto/KeyCrypter.html | 344 + ...KeyCrypterException.InvalidCipherText.html | 339 + ...rypterException.PublicPrivateMismatch.html | 339 + .../bitcoinj/crypto/KeyCrypterException.html | 356 + .../org/bitcoinj/crypto/KeyCrypterScrypt.html | 642 + .../org/bitcoinj/crypto/LazyECPoint.html | 804 + .../bitcoinj/crypto/LinuxSecureRandom.html | 368 + .../org/bitcoinj/crypto/MnemonicCode.html | 520 + ...icException.MnemonicChecksumException.html | 318 + ...onicException.MnemonicLengthException.html | 318 + ...emonicException.MnemonicWordException.html | 363 + .../bitcoinj/crypto/MnemonicException.html | 348 + .../org/bitcoinj/crypto/PBKDF2SHA512.html | 329 + .../crypto/SignatureDecodeException.html | 332 + .../bitcoinj/crypto/TransactionSignature.html | 573 + ...stStoreLoader.DefaultTrustStoreLoader.html | 356 + ...TrustStoreLoader.FileTrustStoreLoader.html | 362 + .../org/bitcoinj/crypto/TrustStoreLoader.html | 351 + .../org/bitcoinj/crypto/X509Utils.html | 350 + .../bitcoinj/crypto/internal/CryptoUtils.html | 337 + .../bitcoinj/crypto/internal/TorUtils.html | 366 + .../crypto/internal/package-summary.html | 172 + .../crypto/internal/package-tree.html | 162 + .../org/bitcoinj/crypto/package-summary.html | 432 + .../org/bitcoinj/crypto/package-tree.html | 263 + .../crypto/utils/MessageVerifyUtils.html | 333 + .../crypto/utils/package-summary.html | 167 + .../bitcoinj/crypto/utils/package-tree.html | 161 + .../jni/NativeBlockChainListener.html | 517 + .../bitcoinj/jni/NativeFutureCallback.html | 392 + .../jni/NativeKeyChainEventListener.html | 377 + .../jni/NativeScriptsChangeEventListener.html | 379 + ...iveTransactionConfidenceEventListener.html | 399 + .../NativeTransactionConfidenceListener.html | 390 + .../jni/NativeWalletChangeEventListener.html | 389 + ...ativeWalletCoinsReceivedEventListener.html | 391 + .../NativeWalletCoinsSentEventListener.html | 394 + .../NativeWalletReorganizeEventListener.html | 381 + .../org/bitcoinj/jni/package-summary.html | 220 + .../org/bitcoinj/jni/package-tree.html | 170 + .../org/bitcoinj/kits/WalletAppKit.html | 1430 ++ .../org/bitcoinj/kits/package-summary.html | 172 + .../org/bitcoinj/kits/package-tree.html | 165 + .../bitcoinj/net/AbstractTimeoutHandler.html | 400 + .../org/bitcoinj/net/BlockingClient.html | 416 + .../bitcoinj/net/BlockingClientManager.html | 507 + .../bitcoinj/net/ClientConnectionManager.html | 326 + .../org/bitcoinj/net/FilterMerger.Result.html | 340 + .../org/bitcoinj/net/FilterMerger.html | 383 + .../org/bitcoinj/net/MessageWriteTarget.html | 281 + .../org/bitcoinj/net/NioClient.html | 365 + .../org/bitcoinj/net/NioClientManager.html | 460 + .../org/bitcoinj/net/NioServer.html | 381 + .../org/bitcoinj/net/SocketTimeoutTask.html | 351 + .../org/bitcoinj/net/StreamConnection.html | 350 + .../bitcoinj/net/StreamConnectionFactory.html | 260 + .../org/bitcoinj/net/TimeoutHandler.html | 287 + .../DnsDiscovery.DnsSeedDiscovery.html | 404 + .../bitcoinj/net/discovery/DnsDiscovery.html | 456 + .../net/discovery/MultiplexingDiscovery.html | 577 + .../bitcoinj/net/discovery/PeerDiscovery.html | 317 + .../net/discovery/PeerDiscoveryException.html | 332 + .../org/bitcoinj/net/discovery/SeedPeers.html | 440 + .../net/discovery/package-summary.html | 222 + .../bitcoinj/net/discovery/package-tree.html | 182 + .../org/bitcoinj/net/package-summary.html | 264 + .../org/bitcoinj/net/package-tree.html | 191 + .../bitcoinj/params/BitcoinNetworkParams.html | 732 + .../org/bitcoinj/params/MainNetParams.html | 457 + .../org/bitcoinj/params/Networks.html | 397 + .../org/bitcoinj/params/RegTestParams.html | 409 + .../org/bitcoinj/params/SigNetParams.html | 459 + .../org/bitcoinj/params/TestNet3Params.html | 493 + .../org/bitcoinj/params/UnitTestParams.html | 458 + .../org/bitcoinj/params/package-summary.html | 210 + .../org/bitcoinj/params/package-tree.html | 174 + .../payments/PaymentProtocol.Ack.html | 275 + .../payments/PaymentProtocol.Output.html | 331 + .../PaymentProtocol.PkiVerificationData.html | 369 + .../protocols/payments/PaymentProtocol.html | 898 + .../PaymentProtocolException.Expired.html | 317 + ...ymentProtocolException.InvalidNetwork.html | 317 + ...ymentProtocolException.InvalidOutputs.html | 317 + ...colException.InvalidPaymentRequestURL.html | 330 + ...ntProtocolException.InvalidPaymentURL.html | 330 + ...ymentProtocolException.InvalidPkiData.html | 330 + ...ymentProtocolException.InvalidPkiType.html | 317 + ...ymentProtocolException.InvalidVersion.html | 317 + ...colException.PkiVerificationException.html | 387 + .../payments/PaymentProtocolException.html | 371 + .../protocols/payments/PaymentSession.html | 960 + .../protocols/payments/package-summary.html | 248 + .../protocols/payments/package-tree.html | 186 + .../bitcoinj/script/Script.VerifyFlag.html | 499 + .../org/bitcoinj/script/Script.html | 1259 ++ .../org/bitcoinj/script/ScriptBuilder.html | 1191 ++ .../org/bitcoinj/script/ScriptChunk.html | 541 + .../org/bitcoinj/script/ScriptError.html | 924 + .../org/bitcoinj/script/ScriptException.html | 375 + .../org/bitcoinj/script/ScriptOpCodes.html | 2472 +++ .../org/bitcoinj/script/ScriptPattern.html | 592 + .../org/bitcoinj/script/package-summary.html | 231 + .../org/bitcoinj/script/package-tree.html | 197 + ...stomTransactionSigner.SignatureAndKey.html | 328 + .../signers/CustomTransactionSigner.html | 396 + .../signers/LocalTransactionSigner.html | 370 + .../signers/MissingSigResolutionSigner.html | 378 + ...ctionSigner.MissingSignatureException.html | 300 + ...TransactionSigner.ProposedTransaction.html | 335 + .../bitcoinj/signers/TransactionSigner.html | 313 + .../org/bitcoinj/signers/package-summary.html | 228 + .../org/bitcoinj/signers/package-tree.html | 184 + .../org/bitcoinj/store/BlockStore.html | 366 + .../bitcoinj/store/BlockStoreException.html | 324 + .../store/ChainFileLockedException.html | 310 + .../bitcoinj/store/FullPrunedBlockStore.html | 577 + .../org/bitcoinj/store/MemoryBlockStore.html | 424 + ...ckStore.StoredBlockAndWasUndoableFlag.html | 328 + .../store/MemoryFullPrunedBlockStore.html | 870 + .../org/bitcoinj/store/SPVBlockStore.html | 726 + .../org/bitcoinj/store/package-summary.html | 235 + .../org/bitcoinj/store/package-tree.html | 192 + .../testing/FakeTxBuilder.BlockPair.html | 328 + .../testing/FakeTxBuilder.DoubleSpends.html | 340 + .../org/bitcoinj/testing/FakeTxBuilder.html | 854 + .../org/bitcoinj/testing/MockAltNetwork.html | 495 + .../testing/MockAltNetworkParams.html | 569 + .../org/bitcoinj/testing/package-summary.html | 186 + .../org/bitcoinj/testing/package-tree.html | 169 + .../org/bitcoinj/uri/BitcoinURI.html | 809 + .../uri/BitcoinURIParseException.html | 317 + .../uri/OptionalFieldValidationException.html | 320 + .../uri/RequiredFieldValidationException.html | 321 + .../org/bitcoinj/uri/package-summary.html | 200 + .../org/bitcoinj/uri/package-tree.html | 175 + .../org/bitcoinj/utils/AppDataDirectory.html | 347 + .../bitcoinj/utils/BaseTaggableObject.html | 453 + .../BlockFileLoader.BlockFileIterator.html | 372 + .../org/bitcoinj/utils/BlockFileLoader.html | 516 + .../org/bitcoinj/utils/BriefLogFormatter.html | 380 + .../bitcoinj/utils/BtcAutoFormat.Style.html | 388 + .../org/bitcoinj/utils/BtcAutoFormat.html | 534 + .../org/bitcoinj/utils/BtcFixedFormat.html | 662 + .../org/bitcoinj/utils/BtcFormat.Builder.html | 555 + .../org/bitcoinj/utils/BtcFormat.html | 2204 +++ .../ContextPropagatingThreadFactory.html | 330 + .../bitcoinj/utils/DaemonThreadFactory.html | 329 + .../org/bitcoinj/utils/ExchangeRate.html | 446 + .../utils/ExponentialBackoff.Params.html | 297 + .../bitcoinj/utils/ExponentialBackoff.html | 507 + .../utils/ListenableCompletableFuture.html | 438 + .../utils/ListenableCompletionStage.html | 290 + .../bitcoinj/utils/ListenerRegistration.html | 381 + .../org/bitcoinj/utils/TaggableObject.html | 333 + .../bitcoinj/utils/Threading.UserThread.html | 415 + .../org/bitcoinj/utils/Threading.html | 560 + .../org/bitcoinj/utils/VersionTally.html | 392 + .../org/bitcoinj/utils/package-summary.html | 321 + .../org/bitcoinj/utils/package-tree.html | 232 + .../wallet/AllRandomKeysRotating.html | 298 + .../wallet/AllowUnconfirmedCoinSelector.html | 344 + .../bitcoinj/wallet/BasicKeyChain.State.html | 394 + .../org/bitcoinj/wallet/BasicKeyChain.html | 1113 ++ .../org/bitcoinj/wallet/CoinSelection.html | 424 + .../org/bitcoinj/wallet/CoinSelector.html | 291 + .../org/bitcoinj/wallet/DecryptingKeyBag.html | 443 + .../bitcoinj/wallet/DefaultCoinSelector.html | 415 + .../wallet/DefaultKeyChainFactory.html | 400 + .../wallet/DefaultRiskAnalysis.Analyzer.html | 321 + .../DefaultRiskAnalysis.RuleViolation.html | 434 + .../bitcoinj/wallet/DefaultRiskAnalysis.html | 536 + .../wallet/DeterministicKeyChain.Builder.html | 708 + .../wallet/DeterministicKeyChain.html | 1814 ++ .../bitcoinj/wallet/DeterministicSeed.html | 1056 ++ ...DeterministicUpgradeRequiredException.html | 298 + .../DeterministicUpgradeRequiresPassword.html | 299 + .../bitcoinj/wallet/EncryptableKeyChain.html | 403 + .../wallet/FilteringCoinSelector.html | 380 + .../org/bitcoinj/wallet/KeyBag.html | 315 + .../bitcoinj/wallet/KeyChain.KeyPurpose.html | 406 + .../org/bitcoinj/wallet/KeyChain.html | 512 + .../org/bitcoinj/wallet/KeyChainFactory.html | 421 + .../wallet/KeyChainGroup.Builder.html | 437 + .../org/bitcoinj/wallet/KeyChainGroup.html | 1719 ++ .../wallet/KeyChainGroupStructure.html | 486 + .../bitcoinj/wallet/KeyTimeCoinSelector.html | 401 + .../org/bitcoinj/wallet/RedeemData.html | 383 + .../wallet/RiskAnalysis.Analyzer.html | 260 + .../bitcoinj/wallet/RiskAnalysis.Result.html | 393 + .../org/bitcoinj/wallet/RiskAnalysis.html | 288 + .../org/bitcoinj/wallet/SendRequest.html | 744 + ...UnreadableWalletException.BadPassword.html | 317 + ...readableWalletException.FutureVersion.html | 317 + ...nreadableWalletException.WrongNetwork.html | 317 + .../wallet/UnreadableWalletException.html | 345 + ...allet.BadWalletEncryptionKeyException.html | 307 + .../bitcoinj/wallet/Wallet.BalanceType.html | 433 + .../wallet/Wallet.CompletionException.html | 331 + .../Wallet.CouldNotAdjustDownwards.html | 262 + .../wallet/Wallet.DustySendRequested.html | 306 + .../Wallet.ExceededMaxTransactionSize.html | 306 + .../wallet/Wallet.MissingSigsMode.html | 406 + .../Wallet.MultipleOpReturnRequested.html | 306 + .../bitcoinj/wallet/Wallet.SendResult.html | 457 + .../org/bitcoinj/wallet/Wallet.html | 6243 +++++++ .../org/bitcoinj/wallet/WalletExtension.html | 320 + .../bitcoinj/wallet/WalletFiles.Listener.html | 275 + .../org/bitcoinj/wallet/WalletFiles.html | 446 + ...alletProtobufSerializer.WalletFactory.html | 321 + .../wallet/WalletProtobufSerializer.html | 819 + .../wallet/WalletTransaction.Pool.html | 406 + .../bitcoinj/wallet/WalletTransaction.html | 344 + .../AbstractKeyChainEventListener.html | 320 + .../CurrentKeyChangeEventListener.html | 251 + .../listeners/KeyChainEventListener.html | 258 + .../listeners/ScriptsChangeEventListener.html | 265 + .../listeners/WalletChangeEventListener.html | 272 + .../WalletCoinsReceivedEventListener.html | 276 + .../WalletCoinsSentEventListener.html | 279 + .../WalletReorganizeEventListener.html | 263 + .../wallet/listeners/package-summary.html | 217 + .../wallet/listeners/package-tree.html | 173 + .../org/bitcoinj/wallet/package-summary.html | 517 + .../org/bitcoinj/wallet/package-tree.html | 259 + javadoc/0.17-alpha3/overview-summary.html | 23 + javadoc/0.17-alpha3/overview-tree.html | 767 + javadoc/0.17-alpha3/package-search-index.js | 1 + javadoc/0.17-alpha3/package-search-index.zip | Bin 0 -> 361 bytes javadoc/0.17-alpha3/resources/glass.png | Bin 0 -> 499 bytes javadoc/0.17-alpha3/resources/x.png | Bin 0 -> 394 bytes javadoc/0.17-alpha3/script.js | 149 + javadoc/0.17-alpha3/search.js | 326 + javadoc/0.17-alpha3/serialized-form.html | 731 + javadoc/0.17-alpha3/stylesheet.css | 910 + javadoc/0.17-alpha3/type-search-index.js | 1 + javadoc/0.17-alpha3/type-search-index.zip | Bin 0 -> 3413 bytes pre-release-notes.md | 38 + 454 files changed, 248714 insertions(+) create mode 100644 javadoc/0.17-alpha3/allclasses-index.html create mode 100644 javadoc/0.17-alpha3/allclasses.html create mode 100644 javadoc/0.17-alpha3/allpackages-index.html create mode 100644 javadoc/0.17-alpha3/constant-values.html create mode 100644 javadoc/0.17-alpha3/deprecated-list.html create mode 100644 javadoc/0.17-alpha3/element-list create mode 100644 javadoc/0.17-alpha3/help-doc.html create mode 100644 javadoc/0.17-alpha3/index-all.html create mode 100644 javadoc/0.17-alpha3/index.html create mode 100644 javadoc/0.17-alpha3/jquery-ui.overrides.css create mode 100644 javadoc/0.17-alpha3/jquery/external/jquery/jquery.js create mode 100644 javadoc/0.17-alpha3/jquery/jquery-3.6.1.min.js create mode 100644 javadoc/0.17-alpha3/jquery/jquery-ui.min.css create mode 100644 javadoc/0.17-alpha3/jquery/jquery-ui.min.js create mode 100644 javadoc/0.17-alpha3/jquery/jszip-utils/dist/jszip-utils-ie.js create mode 100644 javadoc/0.17-alpha3/jquery/jszip-utils/dist/jszip-utils-ie.min.js create mode 100644 javadoc/0.17-alpha3/jquery/jszip-utils/dist/jszip-utils.js create mode 100644 javadoc/0.17-alpha3/jquery/jszip-utils/dist/jszip-utils.min.js create mode 100644 javadoc/0.17-alpha3/jquery/jszip/dist/jszip.js create mode 100644 javadoc/0.17-alpha3/jquery/jszip/dist/jszip.min.js create mode 100644 javadoc/0.17-alpha3/legal/ASSEMBLY_EXCEPTION create mode 100644 javadoc/0.17-alpha3/legal/jquery.md create mode 100644 javadoc/0.17-alpha3/legal/jqueryUI.md create mode 100644 javadoc/0.17-alpha3/legal/jszip.md create mode 100644 javadoc/0.17-alpha3/legal/pako.md create mode 100644 javadoc/0.17-alpha3/member-search-index.js create mode 100644 javadoc/0.17-alpha3/member-search-index.zip create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/Address.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/AddressParser.AddressParserProvider.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/AddressParser.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/Base58.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/Bech32.Bech32Bytes.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/Bech32.Bech32Data.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/Bech32.Encoding.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/Bech32.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/BitcoinNetwork.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/Coin.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/LegacyAddress.AddressHeader.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/LegacyAddress.P2SHHeader.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/LegacyAddress.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/Monetary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/Network.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/ScriptType.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/SegwitAddress.SegwitHrp.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/SegwitAddress.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/Sha256Hash.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/VarInt.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.InvalidCharacter.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.InvalidChecksum.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.InvalidDataLength.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.InvalidPrefix.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.UnexpectedWitnessVersion.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.WrongNetwork.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/Buffers.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/ByteArray.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/ByteUtils.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/FutureUtils.ThrowingSupplier.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/FutureUtils.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/HexFormat.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/InternalUtils.Joiner.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/InternalUtils.Splitter.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/InternalUtils.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/PlatformUtils.OS.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/PlatformUtils.Runtime.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/PlatformUtils.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/Preconditions.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/Stopwatch.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/StreamUtils.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/TimeUtils.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/internal/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/utils/Fiat.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/utils/MonetaryFormat.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/utils/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/base/utils/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/AbstractBlockChain.NewBlockType.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/AbstractBlockChain.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/AddressMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/AddressV1Message.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/AddressV2Message.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/BaseMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/BitcoinSerializer.BitcoinPacketHeader.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/BitcoinSerializer.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/Block.VerifyFlag.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/Block.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/BlockChain.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/BlockLocator.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/BloomFilter.BloomUpdate.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/BloomFilter.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/CheckpointManager.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/Context.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/EmptyMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/FeeFilterMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/FilteredBlock.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/FullPrunedBlockChain.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/GetAddrMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/GetBlocksMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/GetDataMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/GetHeadersMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/HeadersMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/InsufficientMoneyException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/InventoryItem.Type.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/InventoryItem.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/InventoryMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/ListMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/LockTime.HeightLock.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/LockTime.TimeLock.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/LockTime.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/MemoryPoolMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/Message.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/MessageSerializer.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/NetworkParameters.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/NotFoundMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/PartialMerkleTree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/Peer.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/PeerAddress.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/PeerException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/PeerFilterProvider.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/PeerGroup.FilterRecalculateMode.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/PeerGroup.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/PeerSocketHandler.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/Ping.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/Pong.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/ProtocolException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/ProtocolVersion.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/PrunedException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/RejectMessage.RejectCode.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/RejectMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/RejectedTransactionException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/SendAddrV2Message.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/SendHeadersMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/Services.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/StoredBlock.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/StoredUndoableBlock.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/Transaction.Purpose.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/Transaction.SigHash.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/Transaction.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionBag.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionBroadcast.ProgressCallback.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionBroadcast.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionBroadcaster.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.ConfidenceType.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.Listener.ChangeReason.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.Listener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.Source.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionInput.ConnectMode.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionInput.ConnectionResult.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionInput.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionOutPoint.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionOutput.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionOutputChanges.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TransactionWitness.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/TxConfidenceTable.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/UTXO.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/UTXOProvider.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/UTXOProviderException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/UnknownMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/Utils.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.BlockVersionOutOfDate.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.CoinbaseHeightMismatch.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.CoinbaseScriptSizeOutOfRange.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.DuplicatedOutPoint.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.EmptyInputsOrOutputs.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.ExcessiveValue.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.LargerThanMaxBlockSize.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.NegativeValueOutput.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.NoncanonicalSignature.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.UnexpectedCoinbaseInput.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/VersionAck.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/VersionMessage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/AddressEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/BlockchainDownloadEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/BlocksDownloadedEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/ChainDownloadStartedEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/DownloadProgressTracker.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/GetDataEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/NewBestBlockListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/OnTransactionBroadcastListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PeerConnectedEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PeerDataEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PeerDisconnectedEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PeerDiscoveredEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PreMessageReceivedEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/ReorganizeListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/TransactionConfidenceEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/TransactionReceivedInBlockListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/listeners/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/core/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/AesKey.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/BIP38PrivateKey.BadPassphraseException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/BIP38PrivateKey.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/ChildNumber.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/DeterministicHierarchy.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/DeterministicKey.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/DumpedPrivateKey.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.ECDSASignature.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.KeyIsEncryptedException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.MissingPrivateKeyException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/EncodedPrivateKey.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/EncryptableItem.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/EncryptedData.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/HDDerivationException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/HDKeyDerivation.PublicDeriveMode.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/HDKeyDerivation.RawKeyBytes.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/HDKeyDerivation.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/HDPath.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/HDUtils.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypter.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterException.InvalidCipherText.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterException.PublicPrivateMismatch.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterScrypt.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/LazyECPoint.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/LinuxSecureRandom.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicCode.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.MnemonicChecksumException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.MnemonicLengthException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.MnemonicWordException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/PBKDF2SHA512.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/SignatureDecodeException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/TransactionSignature.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/TrustStoreLoader.DefaultTrustStoreLoader.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/TrustStoreLoader.FileTrustStoreLoader.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/TrustStoreLoader.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/X509Utils.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/internal/CryptoUtils.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/internal/TorUtils.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/internal/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/internal/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/utils/MessageVerifyUtils.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/utils/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/crypto/utils/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/jni/NativeBlockChainListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/jni/NativeFutureCallback.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/jni/NativeKeyChainEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/jni/NativeScriptsChangeEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/jni/NativeTransactionConfidenceEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/jni/NativeTransactionConfidenceListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/jni/NativeWalletChangeEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/jni/NativeWalletCoinsReceivedEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/jni/NativeWalletCoinsSentEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/jni/NativeWalletReorganizeEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/jni/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/jni/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/kits/WalletAppKit.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/kits/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/kits/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/AbstractTimeoutHandler.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/BlockingClient.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/BlockingClientManager.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/ClientConnectionManager.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/FilterMerger.Result.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/FilterMerger.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/MessageWriteTarget.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/NioClient.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/NioClientManager.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/NioServer.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/SocketTimeoutTask.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/StreamConnection.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/StreamConnectionFactory.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/TimeoutHandler.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/discovery/DnsDiscovery.DnsSeedDiscovery.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/discovery/DnsDiscovery.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/discovery/MultiplexingDiscovery.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/discovery/PeerDiscovery.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/discovery/PeerDiscoveryException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/discovery/SeedPeers.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/discovery/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/discovery/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/net/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/params/BitcoinNetworkParams.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/params/MainNetParams.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/params/Networks.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/params/RegTestParams.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/params/SigNetParams.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/params/TestNet3Params.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/params/UnitTestParams.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/params/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/params/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.Ack.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.Output.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.PkiVerificationData.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.Expired.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidNetwork.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidOutputs.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentRequestURL.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentURL.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiData.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiType.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidVersion.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.PkiVerificationException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentSession.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/script/Script.VerifyFlag.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/script/Script.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/script/ScriptBuilder.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/script/ScriptChunk.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/script/ScriptError.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/script/ScriptException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/script/ScriptOpCodes.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/script/ScriptPattern.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/script/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/script/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/signers/CustomTransactionSigner.SignatureAndKey.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/signers/CustomTransactionSigner.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/signers/LocalTransactionSigner.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/signers/MissingSigResolutionSigner.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/signers/TransactionSigner.MissingSignatureException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/signers/TransactionSigner.ProposedTransaction.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/signers/TransactionSigner.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/signers/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/signers/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/store/BlockStore.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/store/BlockStoreException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/store/ChainFileLockedException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/store/FullPrunedBlockStore.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/store/MemoryBlockStore.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/store/MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/store/MemoryFullPrunedBlockStore.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/store/SPVBlockStore.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/store/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/store/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/testing/FakeTxBuilder.BlockPair.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/testing/FakeTxBuilder.DoubleSpends.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/testing/FakeTxBuilder.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/testing/MockAltNetwork.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/testing/MockAltNetworkParams.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/testing/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/testing/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/uri/BitcoinURI.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/uri/BitcoinURIParseException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/uri/OptionalFieldValidationException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/uri/RequiredFieldValidationException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/uri/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/uri/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/AppDataDirectory.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/BaseTaggableObject.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/BlockFileLoader.BlockFileIterator.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/BlockFileLoader.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/BriefLogFormatter.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/BtcAutoFormat.Style.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/BtcAutoFormat.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/BtcFixedFormat.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/BtcFormat.Builder.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/BtcFormat.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/ContextPropagatingThreadFactory.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/DaemonThreadFactory.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/ExchangeRate.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/ExponentialBackoff.Params.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/ExponentialBackoff.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/ListenableCompletableFuture.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/ListenableCompletionStage.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/ListenerRegistration.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/TaggableObject.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/Threading.UserThread.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/Threading.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/VersionTally.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/utils/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/AllRandomKeysRotating.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/AllowUnconfirmedCoinSelector.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/BasicKeyChain.State.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/BasicKeyChain.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/CoinSelection.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/CoinSelector.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/DecryptingKeyBag.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultCoinSelector.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultKeyChainFactory.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultRiskAnalysis.Analyzer.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultRiskAnalysis.RuleViolation.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultRiskAnalysis.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicKeyChain.Builder.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicKeyChain.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicSeed.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicUpgradeRequiredException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicUpgradeRequiresPassword.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/EncryptableKeyChain.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/FilteringCoinSelector.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyBag.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChain.KeyPurpose.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChain.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChainFactory.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChainGroup.Builder.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChainGroup.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChainGroupStructure.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyTimeCoinSelector.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/RedeemData.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/RiskAnalysis.Analyzer.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/RiskAnalysis.Result.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/RiskAnalysis.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/SendRequest.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.BadPassword.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.FutureVersion.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.WrongNetwork.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.BadWalletEncryptionKeyException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.BalanceType.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.CompletionException.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.CouldNotAdjustDownwards.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.DustySendRequested.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.ExceededMaxTransactionSize.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.MissingSigsMode.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.MultipleOpReturnRequested.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.SendResult.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletExtension.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletFiles.Listener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletFiles.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletProtobufSerializer.WalletFactory.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletProtobufSerializer.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletTransaction.Pool.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletTransaction.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/AbstractKeyChainEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/CurrentKeyChangeEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/KeyChainEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/ScriptsChangeEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/WalletChangeEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/WalletCoinsSentEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/WalletReorganizeEventListener.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/package-tree.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/package-summary.html create mode 100644 javadoc/0.17-alpha3/org/bitcoinj/wallet/package-tree.html create mode 100644 javadoc/0.17-alpha3/overview-summary.html create mode 100644 javadoc/0.17-alpha3/overview-tree.html create mode 100644 javadoc/0.17-alpha3/package-search-index.js create mode 100644 javadoc/0.17-alpha3/package-search-index.zip create mode 100644 javadoc/0.17-alpha3/resources/glass.png create mode 100644 javadoc/0.17-alpha3/resources/x.png create mode 100644 javadoc/0.17-alpha3/script.js create mode 100644 javadoc/0.17-alpha3/search.js create mode 100644 javadoc/0.17-alpha3/serialized-form.html create mode 100644 javadoc/0.17-alpha3/stylesheet.css create mode 100644 javadoc/0.17-alpha3/type-search-index.js create mode 100644 javadoc/0.17-alpha3/type-search-index.zip diff --git a/javadoc/0.17-alpha3/allclasses-index.html b/javadoc/0.17-alpha3/allclasses-index.html new file mode 100644 index 000000000..331abd0e6 --- /dev/null +++ b/javadoc/0.17-alpha3/allclasses-index.html @@ -0,0 +1,2338 @@ + + + + + +All Classes (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

All Classes

+
+
+ +
+
+ + + diff --git a/javadoc/0.17-alpha3/allclasses.html b/javadoc/0.17-alpha3/allclasses.html new file mode 100644 index 000000000..694f72122 --- /dev/null +++ b/javadoc/0.17-alpha3/allclasses.html @@ -0,0 +1,396 @@ + + + + + +All Classes (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + +
+

All Classes

+
+ +
+
+ + diff --git a/javadoc/0.17-alpha3/allpackages-index.html b/javadoc/0.17-alpha3/allpackages-index.html new file mode 100644 index 000000000..f6b97e830 --- /dev/null +++ b/javadoc/0.17-alpha3/allpackages-index.html @@ -0,0 +1,291 @@ + + + + + +All Packages (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

All Packages

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Package Summary 
    PackageDescription
    org.bitcoinj.base +
    The base package provides foundational types for bitcoinj.
    +
    org.bitcoinj.base.exceptions 
    org.bitcoinj.base.internal 
    org.bitcoinj.base.utils 
    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.listeners 
    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 
    org.bitcoinj.crypto.utils 
    org.bitcoinj.jni 
    org.bitcoinj.kits +
    High level wrapper APIs around the bitcoinj building blocks.
    +
    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 +
    Classes that know how to discover peers in the P2P network using DNS or HTTP.
    +
    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 +
    The BIP70 payment protocol wraps Bitcoin transactions and adds various useful features like memos, refund addresses + and authentication.
    +
    org.bitcoinj.script +
    Classes for working with and executing Bitcoin script programs, as embedded in inputs and outputs.
    +
    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 +
    Block stores persist blockchain data downloaded from remote peers.
    +
    org.bitcoinj.testing 
    org.bitcoinj.uri +
    Parsing and handling of bitcoin: textual URIs as found in qr codes and web links.
    +
    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 +
    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 
    +
  • +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/constant-values.html b/javadoc/0.17-alpha3/constant-values.html new file mode 100644 index 000000000..4b9c241db --- /dev/null +++ b/javadoc/0.17-alpha3/constant-values.html @@ -0,0 +1,2496 @@ + + + + + +Constant Field Values (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Constant Field Values

+
+

Contents

+ +
+
+
+ + +
+

org.bitcoinj.*

+ +
    +
  • + + + + + + + + + + + + + + +
    org.bitcoinj.base.utils.Fiat 
    Modifier and TypeConstant FieldValue
    + +public static final intSMALLEST_UNIT_EXPONENT4
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    org.bitcoinj.base.utils.MonetaryFormat 
    Modifier and TypeConstant FieldValue
    + +public static final java.lang.StringCODE_BTC"BTC"
    + +public static final java.lang.StringCODE_MBTC"mBTC"
    + +public static final java.lang.StringCODE_SAT"sat"
    + +public static final java.lang.StringCODE_UBTC"\u00b5BTC"
    + +public static final intMAX_DECIMALS8
    + +public static final java.lang.StringSYMBOL_BTC"\u20bf"
    + +public static final java.lang.StringSYMBOL_MBTC"m\u20bf"
    + +public static final java.lang.StringSYMBOL_SAT"\u0219"
    + +public static final java.lang.StringSYMBOL_UBTC"\u00b5\u20bf"
    +
  • +
+ + + + + + + + + + + +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/deprecated-list.html b/javadoc/0.17-alpha3/deprecated-list.html new file mode 100644 index 000000000..8d17506c0 --- /dev/null +++ b/javadoc/0.17-alpha3/deprecated-list.html @@ -0,0 +1,1708 @@ + + + + + +Deprecated List (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Deprecated API

+

Contents

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + diff --git a/javadoc/0.17-alpha3/element-list b/javadoc/0.17-alpha3/element-list new file mode 100644 index 000000000..9fa647ac0 --- /dev/null +++ b/javadoc/0.17-alpha3/element-list @@ -0,0 +1,23 @@ +org.bitcoinj.base +org.bitcoinj.base.exceptions +org.bitcoinj.base.internal +org.bitcoinj.base.utils +org.bitcoinj.core +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-alpha3/help-doc.html b/javadoc/0.17-alpha3/help-doc.html new file mode 100644 index 000000000..d8e0cd8f5 --- /dev/null +++ b/javadoc/0.17-alpha3/help-doc.html @@ -0,0 +1,272 @@ + + + + + +API Help (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +
    +

    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 six categories:

    +
      +
    • Interfaces
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
    +
  • +
  • +
    +

    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 class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class Inheritance Diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class or Interface Declaration
    • +
    • Class or Interface Description
    • +
    +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Property Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
    +
      +
    • Field Detail
    • +
    • Property Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. 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.

    +
    +
  • +
  • +
    +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type Declaration
    • +
    • Annotation Type Description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
    +
  • +
  • +
    +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum Declaration
    • +
    • Enum Description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
    +
  • +
  • +
    +

    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 improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
    +
  • +
  • +
    +

    Index

    +

    The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields, as well as lists of all packages and all classes.

    +
    +
  • +
  • +
    +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
    +
  • +
  • +
    +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using 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.

    +
    +
  • +
  • +
    +

    Constant Field Values

    +

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

    +
    +
  • +
  • +
    +

    Search

    +

    You can search for definitions of modules, packages, types, fields, methods and other terms defined in the API, using some or all of the name. "Camel-case" abbreviations are supported: for example, "InpStr" will find "InputStream" and "InputStreamReader".

    +
    +
  • +
+
+This help file applies to API documentation generated by the standard doclet.
+
+ + + diff --git a/javadoc/0.17-alpha3/index-all.html b/javadoc/0.17-alpha3/index-all.html new file mode 100644 index 000000000..ba60c410c --- /dev/null +++ b/javadoc/0.17-alpha3/index-all.html @@ -0,0 +1,14964 @@ + + + + + +Index (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
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 All Packages + + +

A

+
+
ABORT_ON_CONFLICT - 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 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
+
+
Deprecated. +
Use CompletableFuture and CompletableFuture.thenRunAsync(Runnable, Executor)
+
+
+
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, long) 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 - 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 - 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 - 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 - org.bitcoinj.core.Transaction.SigHash
+
 
+
ANYONECANPAY_ALL - org.bitcoinj.core.Transaction.SigHash
+
 
+
ANYONECANPAY_NONE - org.bitcoinj.core.Transaction.SigHash
+
 
+
ANYONECANPAY_SINGLE - 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 - org.bitcoinj.core.Transaction.Purpose
+
+
Transaction that uses up pledges to an assurance contract
+
+
ASSURANCE_CONTRACT_PLEDGE - org.bitcoinj.core.Transaction.Purpose
+
+
Transaction that makes a pledge to an assurance contract.
+
+
ASSURANCE_CONTRACT_STUB - org.bitcoinj.core.Transaction.Purpose
+
+
Send-to-self transaction that exists just to create an output of the right size we can pledge.
+
+
AUTHENTICATION - 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 - 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 - 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 in org.bitcoinj.wallet
+
+
Whether this basic key chain is empty, full of regular (usable for signing) keys, or full of watching keys.
+
+
BC - org.bitcoinj.base.SegwitAddress.SegwitHrp
+
 
+
BCRT - 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 - 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 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 - 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 - 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 regular BigInteger.toByteArray() includes the sign bit of the number and + might result in an extra byte addition.
+
+
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 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 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 - 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 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 - org.bitcoinj.core.ProtocolVersion
+
 
+
BLOOM_FILTER_BIP111 - 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 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 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 - 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 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 - 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.
+
+
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 - 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 - 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 - 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 - 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 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 - 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
+
 
+
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
+
+
Returns a new CompletableFuture that is already completed with + the given value.
+
+
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
+
+
Concatentate 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.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.creationTime().
+
+
creationTime() - 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.
+
+
creationTime() - Method in interface org.bitcoinj.crypto.EncryptableItem
+
+
Returns the time at which this encryptable item was first created/derived, or empty of unknown.
+
+
creationTime() - Method in class org.bitcoinj.script.Script
+
+
Gets the creation time of this script, or empty if unknown.
+
+
creationTime() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
creationTime(Instant) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Sets the creation time to build the script with.
+
+
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 - 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.
+
+
CURVE - Static variable in class org.bitcoinj.crypto.ECKey
+
+
The parameters of the secp256k1 curve that Bitcoin uses.
+
+
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 - 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 - 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.crypto.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 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 - 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 - 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
+
+ +
+
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 - 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 - 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 - 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 - 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 - 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 - 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.creationTime().
+
+
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.
+
+
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 - 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.crypto.internal.TorUtils
+
+
Encode an Onion URL from a Tor V2 address.
+
+
encodeOnionUrlV3(byte[]) - Static method in class org.bitcoinj.crypto.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 - 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 - org.bitcoinj.wallet.Wallet.BalanceType
+
+
Balance calculated assuming all pending transactions are in fact included into the best chain by miners.
+
+
ESTIMATED_SPENDABLE - 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 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
+
+
Returns a new ListenableCompletableFuture that is already completed exceptionally + with the given throwable.
+
+
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
+
 
+
fastCatchupTime() - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns the current fast catchup time.
+
+
FEEFILTER - 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 - 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 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 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 - 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 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 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 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
+
+
Deprecated. +
Use TransactionBroadcast.awaitRelayed() (and maybe CompletableFuture.thenApply(Function))
+
+
+
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 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.
+
+
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 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
+
+ +
+
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.
+
+
getFastCatchupTimeSecs() - Method in class org.bitcoinj.core.PeerGroup
+
+
Deprecated. + +
+
+
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
+
+ +
+
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 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 (eg "0", "PUSHDATA", or "NON_OP(10)")
+
+
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 (eg "PUSHDATA2", or "PUSHDATA(23)")
+
+
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 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

+
+
HALF_CURVE_ORDER - Static variable in class org.bitcoinj.crypto.ECKey
+
+
Equal to CURVE.getN().shiftRight(1), used for canonicalising the S value of a signature.
+
+
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 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 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
+
 
+
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 org.bitcoinj.base.LegacyAddress.AddressHeader
+
 
+
headerByte() - Method in enum 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 - 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 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 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 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 org.bitcoinj.base.BitcoinNetwork
+
+
The ID string for the main, production network where people trade things.
+
+
ID_REGTEST - Static variable in enum org.bitcoinj.base.BitcoinNetwork
+
+
The ID string for regtest mode.
+
+
ID_SIGNET - Static variable in enum org.bitcoinj.base.BitcoinNetwork
+
+
The ID string for the signet.
+
+
ID_TESTNET - Static variable in enum 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 - 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 - 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 org.bitcoinj.core.ProtocolVersion
+
 
+
INVALID - 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 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
+
+
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
+
 
+
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 - 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 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.
+
+
lastBroadcastTime() - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Return the time the transaction was last announced to us, or empty if unknown.
+
+
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 ECPoint that delays decoding of the point for as long as possible.
+
+
LazyECPoint(ECCurve, byte[]) - Constructor for class org.bitcoinj.crypto.LazyECPoint
+
+
Construct a LazyECPoint from a public key.
+
+
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 in org.bitcoinj.base
+
+
Address header of legacy P2PKH addresses for standard Bitcoin networks.
+
+
LegacyAddress.P2SHHeader - Enum in org.bitcoinj.base
+
+
Address header of legacy P2SH addresses for standard Bitcoin networks.
+
+
legacyAddressHeader() - Method in enum 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 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 - 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 - 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 - org.bitcoinj.base.internal.PlatformUtils.OS
+
 
+
MAINNET - 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 - 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 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 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 - org.bitcoinj.script.Script.VerifyFlag
+
 
+
MINIMUM - 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 - 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 - 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_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_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 - org.bitcoinj.wallet.RiskAnalysis.Result
+
 
+
NON_STANDARD - 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 - org.bitcoinj.core.Transaction.SigHash
+
 
+
NONE - org.bitcoinj.wallet.DefaultRiskAnalysis.RuleViolation
+
 
+
NONEMPTY_STACK - org.bitcoinj.wallet.DefaultRiskAnalysis.RuleViolation
+
 
+
nonFinal - Variable in class org.bitcoinj.wallet.DefaultRiskAnalysis
+
 
+
NONSTANDARD - org.bitcoinj.core.RejectMessage.RejectCode
+
+
The message described an object was not standard and was thus not accepted.
+
+
NORMAL - 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 - 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 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 - org.bitcoinj.core.RejectMessage.RejectCode
+
+
The message was obsolete or described an object which is obsolete (eg unsupported, old version, v1 block)
+
+
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 org.bitcoinj.base.ScriptType
+
+
Use this method to create a ScriptType from a known good script identifier string.
+
+
of(String) - Static method in enum 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
+
+
Converts a generic CompletableFuture to a ListenableCompletableFuture.
+
+
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 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 org.bitcoinj.base.LegacyAddress.AddressHeader
+
 
+
ofNetwork(BitcoinNetwork) - Static method in enum org.bitcoinj.base.LegacyAddress.P2SHHeader
+
 
+
ofNetwork(BitcoinNetwork) - Static method in enum 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 - 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 - 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 - 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.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 - 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 - org.bitcoinj.base.ScriptType
+
 
+
P2PKH - org.bitcoinj.base.ScriptType
+
 
+
p2sh - Variable in class org.bitcoinj.base.LegacyAddress
+
+
True if P2SH, false if P2PKH.
+
+
P2SH - org.bitcoinj.base.ScriptType
+
 
+
P2SH - org.bitcoinj.script.Script.VerifyFlag
+
 
+
p2shHeader - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
P2TR - org.bitcoinj.base.ScriptType
+
 
+
P2WPKH - org.bitcoinj.base.ScriptType
+
 
+
P2WSH - 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, and a creation time.
+
+
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 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 - 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 - 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 in org.bitcoinj.base.internal
+
 
+
PlatformUtils.Runtime - Enum 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 - 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 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 - 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 - 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.
+
+
RECORD_SIZE - Static variable in class org.bitcoinj.store.SPVBlockStore
+
 
+
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 - 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 - 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 - 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 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 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_ERR_BAD_OPCODE - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_CHECKMULTISIGVERIFY - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_CHECKSIGVERIFY - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_CLEANSTACK - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_DISABLED_OPCODE - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_EQUALVERIFY - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_ERROR_COUNT - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_EVAL_FALSE - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_INVALID_ALTSTACK_OPERATION - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_INVALID_STACK_OPERATION - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_MINIMALDATA - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_MINIMALIF - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_NEGATIVE_LOCKTIME - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_NUMEQUALVERIFY - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_OK - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_OP_COUNT - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_OP_RETURN - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_PUBKEY_COUNT - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_PUBKEYTYPE - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_PUSH_SIZE - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SCRIPT_SIZE - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SIG_COUNT - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SIG_DER - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SIG_HASHTYPE - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SIG_HIGH_S - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SIG_NULLDUMMY - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SIG_NULLFAIL - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SIG_PUSHONLY - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_STACK_SIZE - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_UNBALANCED_CONDITIONAL - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_UNKNOWN_ERROR - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_UNSATISFIED_LOCKTIME - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_VERIFY - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_WITNESS_MALLEATED - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_WITNESS_MALLEATED_P2SH - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_WITNESS_PUBKEYTYPE - org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_WITNESS_UNEXPECTED - org.bitcoinj.script.ScriptError
+
 
+
Script.VerifyFlag - Enum 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 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 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 - 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 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 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 - 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 - 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 to the output stream.
+
+
serialize(String, byte[], OutputStream) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Writes message to to the output stream.
+
+
serialize(Message, OutputStream) - Method in class org.bitcoinj.core.BitcoinSerializer
+
+
Writes message to to the output stream.
+
+
serialize(Message, OutputStream) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Writes message to 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.
+
+
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
+
+ +
+
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 - 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, long, TimeUnit, WalletFiles.Listener) + before.
+
+
SIDE_CHAIN - 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 - 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 - 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 - 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 - 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 - 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 - org.bitcoinj.script.Script.VerifyFlag
+
 
+
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 - 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 - 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 - org.bitcoinj.base.SegwitAddress.SegwitHrp
+
 
+
TESTNET - 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 - 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.crypto.internal
+
+
Utilities for encoding and decoding Onion addresses.
+
+
TorUtils() - Constructor for class org.bitcoinj.crypto.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 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 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 - org.bitcoinj.core.InventoryItem.Type
+
 
+
Transaction.Purpose - Enum in org.bitcoinj.core
+
+
This enum describes the underlying reason the transaction was created.
+
+
Transaction.SigHash - Enum 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 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 in org.bitcoinj.core
+
+
An enum that describes why a transaction confidence listener is being invoked (i.e.
+
+
TransactionConfidence.Source - Enum 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 in org.bitcoinj.core
+
 
+
TransactionInput.ConnectMode - Enum 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 - 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 - org.bitcoinj.core.Transaction.Purpose
+
+
Used when the purpose of a transaction is genuinely unknown.
+
+
UNKNOWN - 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 - 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 - org.bitcoinj.core.Transaction.SigHash
+
 
+
UNSPENT - org.bitcoinj.wallet.WalletTransaction.Pool
+
 
+
UPDATE_ALL - org.bitcoinj.core.BloomFilter.BloomUpdate
+
 
+
UPDATE_NONE - org.bitcoinj.core.BloomFilter.BloomUpdate
+
 
+
UPDATE_P2PUBKEY_ONLY - 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 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 - org.bitcoinj.wallet.Wallet.MissingSigsMode
+
+
Missing signatures will be replaced by dummy sigs.
+
+
USE_OP_ZERO - 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 - 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 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 org.bitcoinj.base.Bech32.Encoding
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.base.BitcoinNetwork
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.base.internal.PlatformUtils.OS
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.base.internal.PlatformUtils.Runtime
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.base.LegacyAddress.AddressHeader
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.base.LegacyAddress.P2SHHeader
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.base.ScriptType
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.base.SegwitAddress.SegwitHrp
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.core.AbstractBlockChain.NewBlockType
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.core.Block.VerifyFlag
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.core.BloomFilter.BloomUpdate
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.core.InventoryItem.Type
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.core.PeerGroup.FilterRecalculateMode
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.core.ProtocolVersion
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.core.RejectMessage.RejectCode
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.core.Transaction.Purpose
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.core.Transaction.SigHash
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.core.TransactionConfidence.ConfidenceType
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.core.TransactionConfidence.Listener.ChangeReason
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.core.TransactionConfidence.Source
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.core.TransactionInput.ConnectionResult
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.core.TransactionInput.ConnectMode
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.crypto.HDKeyDerivation.PublicDeriveMode
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.script.Script.VerifyFlag
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.script.ScriptError
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.utils.BtcAutoFormat.Style
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.wallet.BasicKeyChain.State
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.wallet.DefaultRiskAnalysis.RuleViolation
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.wallet.KeyChain.KeyPurpose
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.wallet.RiskAnalysis.Result
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.wallet.Wallet.BalanceType
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.wallet.Wallet.MissingSigsMode
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.bitcoinj.wallet.WalletTransaction.Pool
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String, long) - Static method in class org.bitcoinj.base.utils.Fiat
+
 
+
values() - Static method in enum org.bitcoinj.base.Bech32.Encoding
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.base.BitcoinNetwork
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.base.internal.PlatformUtils.OS
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.base.internal.PlatformUtils.Runtime
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.base.LegacyAddress.AddressHeader
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.base.LegacyAddress.P2SHHeader
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.base.ScriptType
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.base.SegwitAddress.SegwitHrp
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.core.AbstractBlockChain.NewBlockType
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.core.Block.VerifyFlag
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.core.BloomFilter.BloomUpdate
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.core.InventoryItem.Type
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.core.PeerGroup.FilterRecalculateMode
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.core.ProtocolVersion
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.core.RejectMessage.RejectCode
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.core.Transaction.Purpose
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.core.Transaction.SigHash
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.core.TransactionConfidence.ConfidenceType
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.core.TransactionConfidence.Listener.ChangeReason
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.core.TransactionConfidence.Source
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.core.TransactionInput.ConnectionResult
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.core.TransactionInput.ConnectMode
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.crypto.HDKeyDerivation.PublicDeriveMode
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.script.Script.VerifyFlag
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.script.ScriptError
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.utils.BtcAutoFormat.Style
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.wallet.BasicKeyChain.State
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.wallet.DefaultRiskAnalysis.RuleViolation
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.wallet.KeyChain.KeyPurpose
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.wallet.RiskAnalysis.Result
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.wallet.Wallet.BalanceType
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.wallet.Wallet.MissingSigsMode
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.bitcoinj.wallet.WalletTransaction.Pool
+
+
Returns an array containing the constants of this enum type, 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 - 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 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 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 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 - 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 - org.bitcoinj.base.internal.PlatformUtils.OS
+
 
+
with(Transaction...) - Static method in class org.bitcoinj.core.InventoryMessage
+
+ +
+
WITH_INVERSION - 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 - org.bitcoinj.core.InventoryItem.Type
+
 
+
WITNESS_FILTERED_BLOCK - 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 - org.bitcoinj.core.InventoryItem.Type
+
 
+
WITNESS_VERSION - 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
+
 
+
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, byte[], int) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 16-bit integer to a given byte array in big-endian format, starting at a given offset.
+
+
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, byte[], int) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 16-bit integer to a given byte array in little-endian format, starting at a given offset.
+
+
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.
+
+
writeInt32BE(long, 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(long, 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(long, 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 - org.bitcoinj.base.LegacyAddress.AddressHeader
+
 
+
X111 - org.bitcoinj.base.LegacyAddress.AddressHeader
+
 
+
X196 - org.bitcoinj.base.LegacyAddress.P2SHHeader
+
 
+
X5 - 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 - 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 All Packages
+
+ + + diff --git a/javadoc/0.17-alpha3/index.html b/javadoc/0.17-alpha3/index.html new file mode 100644 index 000000000..466fc38a0 --- /dev/null +++ b/javadoc/0.17-alpha3/index.html @@ -0,0 +1,287 @@ + + + + + +Overview (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

bitcoinj-core 0.17-SNAPSHOT API

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Packages 
PackageDescription
org.bitcoinj.base +
The base package provides foundational types for bitcoinj.
+
org.bitcoinj.base.exceptions 
org.bitcoinj.base.internal 
org.bitcoinj.base.utils 
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.listeners 
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 
org.bitcoinj.crypto.utils 
org.bitcoinj.jni 
org.bitcoinj.kits +
High level wrapper APIs around the bitcoinj building blocks.
+
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 +
Classes that know how to discover peers in the P2P network using DNS or HTTP.
+
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 +
The BIP70 payment protocol wraps Bitcoin transactions and adds various useful features like memos, refund addresses + and authentication.
+
org.bitcoinj.script +
Classes for working with and executing Bitcoin script programs, as embedded in inputs and outputs.
+
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 +
Block stores persist blockchain data downloaded from remote peers.
+
org.bitcoinj.testing 
org.bitcoinj.uri +
Parsing and handling of bitcoin: textual URIs as found in qr codes and web links.
+
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 +
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 
+
+
+ + + diff --git a/javadoc/0.17-alpha3/jquery-ui.overrides.css b/javadoc/0.17-alpha3/jquery-ui.overrides.css new file mode 100644 index 000000000..facf852c2 --- /dev/null +++ b/javadoc/0.17-alpha3/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-alpha3/jquery/external/jquery/jquery.js b/javadoc/0.17-alpha3/jquery/external/jquery/jquery.js new file mode 100644 index 000000000..50937333b --- /dev/null +++ b/javadoc/0.17-alpha3/jquery/external/jquery/jquery.js @@ -0,0 +1,10872 @@ +/*! + * jQuery JavaScript Library v3.5.1 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2020-05-04T22:49Z + */ +( function( global, factory ) { + + "use strict"; + + if ( typeof module === "object" && typeof module.exports === "object" ) { + + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. +"use strict"; + +var arr = []; + +var getProto = Object.getPrototypeOf; + +var slice = arr.slice; + +var flat = arr.flat ? function( array ) { + return arr.flat.call( array ); +} : function( array ) { + return arr.concat.apply( [], array ); +}; + + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var fnToString = hasOwn.toString; + +var ObjectFunctionString = fnToString.call( Object ); + +var support = {}; + +var isFunction = function isFunction( obj ) { + + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + return typeof obj === "function" && typeof obj.nodeType !== "number"; + }; + + +var isWindow = function isWindow( obj ) { + return obj != null && obj === obj.window; + }; + + +var document = window.document; + + + + var preservedScriptAttributes = { + type: true, + src: true, + nonce: true, + noModule: true + }; + + function DOMEval( code, node, doc ) { + doc = doc || document; + + var i, val, + script = doc.createElement( "script" ); + + script.text = code; + if ( node ) { + for ( i in preservedScriptAttributes ) { + + // Support: Firefox 64+, Edge 18+ + // Some browsers don't support the "nonce" property on scripts. + // On the other hand, just using `getAttribute` is not enough as + // the `nonce` attribute is reset to an empty string whenever it + // becomes browsing-context connected. + // See https://github.com/whatwg/html/issues/2369 + // See https://html.spec.whatwg.org/#nonce-attributes + // The `node.getAttribute` check was added for the sake of + // `jQuery.globalEval` so that it can fake a nonce-containing node + // via an object. + val = node[ i ] || node.getAttribute && node.getAttribute( i ); + if ( val ) { + script.setAttribute( i, val ); + } + } + } + doc.head.appendChild( script ).parentNode.removeChild( script ); + } + + +function toType( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} +/* global Symbol */ +// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module + + + +var + version = "3.5.1", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + + // Return all the elements in a clean array + if ( num == null ) { + return slice.call( this ); + } + + // Return just the one element from the set + return num < 0 ? this[ num + this.length ] : this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + even: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return ( i + 1 ) % 2; + } ) ); + }, + + odd: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return i % 2; + } ) ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // Skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !isFunction( target ) ) { + target = {}; + } + + // Extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + copy = options[ name ]; + + // Prevent Object.prototype pollution + // Prevent never-ending loop + if ( name === "__proto__" || target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = Array.isArray( copy ) ) ) ) { + src = target[ name ]; + + // Ensure proper type for the source value + if ( copyIsArray && !Array.isArray( src ) ) { + clone = []; + } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { + clone = {}; + } else { + clone = src; + } + copyIsArray = false; + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + isPlainObject: function( obj ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { + return false; + } + + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; + } + + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; + }, + + isEmptyObject: function( obj ) { + var name; + + for ( name in obj ) { + return false; + } + return true; + }, + + // Evaluates a script in a provided context; falls back to the global one + // if not specified. + globalEval: function( code, options, doc ) { + DOMEval( code, { nonce: options && options.nonce }, doc ); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return flat( ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), +function( _i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +} ); + +function isArrayLike( obj ) { + + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = toType( obj ); + + if ( isFunction( obj ) || isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.3.5 + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://js.foundation/ + * + * Date: 2020-03-14 + */ +( function( window ) { +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + nonnativeSelectorCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // Instance methods + hasOwn = ( {} ).hasOwnProperty, + arr = [], + pop = arr.pop, + pushNative = arr.push, + push = arr.push, + slice = arr.slice, + + // Use a stripped-down indexOf as it's faster than native + // https://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[ i ] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + + "ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram + identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + + // "Attribute values must be CSS identifiers [capture 5] + // or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + + whitespace + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + + "*" ), + rdescend = new RegExp( whitespace + "|>" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rhtml = /HTML$/i, + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + + // CSS escapes + // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), + funescape = function( escape, nonHex ) { + var high = "0x" + escape.slice( 1 ) - 0x10000; + + return nonHex ? + + // Strip the backslash prefix from a non-hex escape sequence + nonHex : + + // Replace a hexadecimal escape sequence with the encoded Unicode code point + // Support: IE <=11+ + // For values outside the Basic Multilingual Plane (BMP), manually construct a + // surrogate pair + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // CSS string/identifier serialization + // https://drafts.csswg.org/cssom/#common-serializing-idioms + rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, + fcssescape = function( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }, + + inDisabledFieldset = addCombinator( + function( elem ) { + return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; + }, + { dir: "parentNode", next: "legend" } + ); + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + ( arr = slice.call( preferredDoc.childNodes ) ), + preferredDoc.childNodes + ); + + // Support: Android<4.0 + // Detect silently failing push.apply + // eslint-disable-next-line no-unused-expressions + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + pushNative.apply( target, slice.call( els ) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + + // Can't trust NodeList.length + while ( ( target[ j++ ] = els[ i++ ] ) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + setDocument( context ); + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { + + // ID selector + if ( ( m = match[ 1 ] ) ) { + + // Document context + if ( nodeType === 9 ) { + if ( ( elem = context.getElementById( m ) ) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && ( elem = newContext.getElementById( m ) ) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[ 2 ] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !nonnativeSelectorCache[ selector + " " ] && + ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && + + // Support: IE 8 only + // Exclude object elements + ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { + + newSelector = selector; + newContext = context; + + // qSA considers elements outside a scoping root when evaluating child or + // descendant combinators, which is not what we want. + // In such cases, we work around the behavior by prefixing every selector in the + // list with an ID selector referencing the scope context. + // The technique has to be used as well when a leading combinator is used + // as such selectors are not recognized by querySelectorAll. + // Thanks to Andrew Dupont for this technique. + if ( nodeType === 1 && + ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + + // We can use :scope instead of the ID hack if the browser + // supports it & if we're not changing the context. + if ( newContext !== context || !support.scope ) { + + // Capture the context ID, setting it first if necessary + if ( ( nid = context.getAttribute( "id" ) ) ) { + nid = nid.replace( rcssescape, fcssescape ); + } else { + context.setAttribute( "id", ( nid = expando ) ); + } + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + + toSelector( groups[ i ] ); + } + newSelector = groups.join( "," ); + } + + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + nonnativeSelectorCache( selector, true ); + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return ( cache[ key + " " ] = value ); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */ +function assert( fn ) { + var el = document.createElement( "fieldset" ); + + try { + return !!fn( el ); + } catch ( e ) { + return false; + } finally { + + // Remove from its parent by default + if ( el.parentNode ) { + el.parentNode.removeChild( el ); + } + + // release memory in IE + el = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split( "|" ), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[ i ] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + a.sourceIndex - b.sourceIndex; + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( ( cur = cur.nextSibling ) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return ( name === "input" || name === "button" ) && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ( "form" in elem ) { + + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if ( elem.parentNode && elem.disabled === false ) { + + // Option elements defer to a parent optgroup if present + if ( "label" in elem ) { + if ( "label" in elem.parentNode ) { + return elem.parentNode.disabled === disabled; + } else { + return elem.disabled === disabled; + } + } + + // Support: IE 6 - 11 + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || + + // Where there is no isDisabled, check manually + /* jshint -W018 */ + elem.isDisabled !== !disabled && + inDisabledFieldset( elem ) === disabled; + } + + return elem.disabled === disabled; + + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ( "label" in elem ) { + return elem.disabled === disabled; + } + + // Remaining elements are neither :enabled nor :disabled + return false; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction( function( argument ) { + argument = +argument; + return markFunction( function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ ( j = matchIndexes[ i ] ) ] ) { + seed[ j ] = !( matches[ j ] = seed[ j ] ); + } + } + } ); + } ); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + var namespace = elem.namespaceURI, + docElem = ( elem.ownerDocument || elem ).documentElement; + + // Support: IE <=8 + // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes + // https://bugs.jquery.com/ticket/4833 + return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, subWindow, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9 - 11+, Edge 12 - 18+ + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( preferredDoc != document && + ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { + + // Support: IE 11, Edge + if ( subWindow.addEventListener ) { + subWindow.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( subWindow.attachEvent ) { + subWindow.attachEvent( "onunload", unloadHandler ); + } + } + + // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, + // Safari 4 - 5 only, Opera <=11.6 - 12.x only + // IE/Edge & older browsers don't support the :scope pseudo-class. + // Support: Safari 6.0 only + // Safari 6.0 supports :scope but it's an alias of :root there. + support.scope = assert( function( el ) { + docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); + return typeof el.querySelectorAll !== "undefined" && + !el.querySelectorAll( ":scope fieldset div" ).length; + } ); + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert( function( el ) { + el.className = "i"; + return !el.getAttribute( "className" ); + } ); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert( function( el ) { + el.appendChild( document.createComment( "" ) ); + return !el.getElementsByTagName( "*" ).length; + } ); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert( function( el ) { + docElem.appendChild( el ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; + } ); + + // ID filter and find + if ( support.getById ) { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute( "id" ) === attrId; + }; + }; + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var elem = context.getElementById( id ); + return elem ? [ elem ] : []; + } + }; + } else { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode( "id" ); + return node && node.value === attrId; + }; + }; + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var node, i, elems, + elem = context.getElementById( id ); + + if ( elem ) { + + // Verify the id attribute + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + + // Fall back on getElementsByName + elems = context.getElementsByName( id ); + i = 0; + while ( ( elem = elems[ i++ ] ) ) { + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + } + } + + return []; + } + }; + } + + // Tag + Expr.find[ "TAG" ] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See https://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { + + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert( function( el ) { + + var input; + + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // https://bugs.jquery.com/ticket/12359 + docElem.appendChild( el ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !el.querySelectorAll( "[selected]" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push( "~=" ); + } + + // Support: IE 11+, Edge 15 - 18+ + // IE 11/Edge don't find elements on a `[name='']` query in some cases. + // Adding a temporary attribute to the document before the selection works + // around the issue. + // Interestingly, IE 10 & older don't seem to have the issue. + input = document.createElement( "input" ); + input.setAttribute( "name", "" ); + el.appendChild( input ); + if ( !el.querySelectorAll( "[name='']" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + + whitespace + "*(?:''|\"\")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !el.querySelectorAll( ":checked" ).length ) { + rbuggyQSA.push( ":checked" ); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push( ".#.+[+~]" ); + } + + // Support: Firefox <=3.6 - 5 only + // Old Firefox doesn't throw on a badly-escaped identifier. + el.querySelectorAll( "\\\f" ); + rbuggyQSA.push( "[\\r\\n\\f]" ); + } ); + + assert( function( el ) { + el.innerHTML = "" + + ""; + + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement( "input" ); + input.setAttribute( "type", "hidden" ); + el.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( el.querySelectorAll( "[name=d]" ).length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: IE9-11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + docElem.appendChild( el ).disabled = true; + if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: Opera 10 - 11 only + // Opera 10-11 does not throw on post-comma invalid pseudos + el.querySelectorAll( "*,:x" ); + rbuggyQSA.push( ",.*:" ); + } ); + } + + if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector ) ) ) ) { + + assert( function( el ) { + + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( el, "*" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( el, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + } ); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + ) ); + } : + function( a, b ) { + if ( b ) { + while ( ( b = b.parentNode ) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { + + // Choose the first element that is related to our preferred document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( a == document || a.ownerDocument == preferredDoc && + contains( preferredDoc, a ) ) { + return -1; + } + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( b == document || b.ownerDocument == preferredDoc && + contains( preferredDoc, b ) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + return a == document ? -1 : + b == document ? 1 : + /* eslint-enable eqeqeq */ + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( ( cur = cur.parentNode ) ) { + ap.unshift( cur ); + } + cur = b; + while ( ( cur = cur.parentNode ) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[ i ] === bp[ i ] ) { + i++; + } + + return i ? + + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[ i ], bp[ i ] ) : + + // Otherwise nodes in our document sort first + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + ap[ i ] == preferredDoc ? -1 : + bp[ i ] == preferredDoc ? 1 : + /* eslint-enable eqeqeq */ + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + setDocument( elem ); + + if ( support.matchesSelector && documentIsHTML && + !nonnativeSelectorCache[ expr + " " ] && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch ( e ) { + nonnativeSelectorCache( expr, true ); + } + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( context.ownerDocument || context ) != document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( elem.ownerDocument || elem ) != document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; +}; + +Sizzle.escape = function( sel ) { + return ( sel + "" ).replace( rcssescape, fcssescape ); +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + + // If no nodeType, this is expected to be an array + while ( ( node = elem[ i++ ] ) ) { + + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[ 1 ] = match[ 1 ].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[ 3 ] = ( match[ 3 ] || match[ 4 ] || + match[ 5 ] || "" ).replace( runescape, funescape ); + + if ( match[ 2 ] === "~=" ) { + match[ 3 ] = " " + match[ 3 ] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[ 1 ] = match[ 1 ].toLowerCase(); + + if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { + + // nth-* requires argument + if ( !match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[ 4 ] = +( match[ 4 ] ? + match[ 5 ] + ( match[ 6 ] || 1 ) : + 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); + match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); + + // other types prohibit arguments + } else if ( match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[ 6 ] && match[ 2 ]; + + if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[ 3 ] ) { + match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + + // Get excess from tokenize (recursively) + ( excess = tokenize( unquoted, true ) ) && + + // advance to the next closing parenthesis + ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { + + // excess is a negative index + match[ 0 ] = match[ 0 ].slice( 0, excess ); + match[ 2 ] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { + return true; + } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + ( pattern = new RegExp( "(^|" + whitespace + + ")" + className + "(" + whitespace + "|$)" ) ) && classCache( + className, function( elem ) { + return pattern.test( + typeof elem.className === "string" && elem.className || + typeof elem.getAttribute !== "undefined" && + elem.getAttribute( "class" ) || + "" + ); + } ); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + /* eslint-disable max-len */ + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + /* eslint-enable max-len */ + + }; + }, + + "CHILD": function( type, what, _argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, _context, xml ) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( ( node = node[ dir ] ) ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + + return false; + } + } + + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( ( node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + + // Use previously-cached element index if available + if ( useCache ) { + + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + + // Use the same loop as above to seek `elem` from the start + while ( ( node = ++nodeIndex && node && node[ dir ] || + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || + ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction( function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[ i ] ); + seed[ idx ] = !( matches[ idx ] = matched[ i ] ); + } + } ) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + + // Potentially complex pseudos + "not": markFunction( function( selector ) { + + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction( function( seed, matches, _context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( ( elem = unmatched[ i ] ) ) { + seed[ i ] = !( matches[ i ] = elem ); + } + } + } ) : + function( elem, _context, xml ) { + input[ 0 ] = elem; + matcher( input, null, xml, results ); + + // Don't keep the element (issue #299) + input[ 0 ] = null; + return !results.pop(); + }; + } ), + + "has": markFunction( function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + } ), + + "contains": markFunction( function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; + }; + } ), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + + // lang value must be a valid identifier + if ( !ridentifier.test( lang || "" ) ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( ( elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); + return false; + }; + } ), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && + ( !document.hasFocus || document.hasFocus() ) && + !!( elem.type || elem.href || ~elem.tabIndex ); + }, + + // Boolean properties + "enabled": createDisabledPseudo( false ), + "disabled": createDisabledPseudo( true ), + + "checked": function( elem ) { + + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return ( nodeName === "input" && !!elem.checked ) || + ( nodeName === "option" && !!elem.selected ); + }, + + "selected": function( elem ) { + + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + // eslint-disable-next-line no-unused-expressions + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos[ "empty" ]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( ( attr = elem.getAttribute( "type" ) ) == null || + attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo( function() { + return [ 0 ]; + } ), + + "last": createPositionalPseudo( function( _matchIndexes, length ) { + return [ length - 1 ]; + } ), + + "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + } ), + + "even": createPositionalPseudo( function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "odd": createPositionalPseudo( function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? + argument + length : + argument > length ? + length : + argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ) + } +}; + +Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || ( match = rcomma.exec( soFar ) ) ) { + if ( match ) { + + // Don't consume trailing commas as valid + soFar = soFar.slice( match[ 0 ].length ) || soFar; + } + groups.push( ( tokens = [] ) ); + } + + matched = false; + + // Combinators + if ( ( match = rcombinators.exec( soFar ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + + // Cast descendant combinators to space + type: match[ 0 ].replace( rtrim, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || + ( match = preFilters[ type ]( match ) ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[ i ].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + skip = combinator.next, + key = skip || dir, + checkNonElements = base && key === "parentNode", + doneName = done++; + + return combinator.first ? + + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + return false; + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || ( elem[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || + ( outerCache[ elem.uniqueID ] = {} ); + + if ( skip && skip === elem.nodeName.toLowerCase() ) { + elem = elem[ dir ] || elem; + } else if ( ( oldCache = uniqueCache[ key ] ) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return ( newCache[ 2 ] = oldCache[ 2 ] ); + } else { + + // Reuse newcache so results back-propagate to previous elements + uniqueCache[ key ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { + return true; + } + } + } + } + } + return false; + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[ i ]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[ 0 ]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[ i ], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( ( elem = unmatched[ i ] ) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction( function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( + selector || "*", + context.nodeType ? [ context ] : context, + [] + ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( ( elem = temp[ i ] ) ) { + matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) ) { + + // Restore matcherIn since elem is not yet a final match + temp.push( ( matcherIn[ i ] = elem ) ); + } + } + postFinder( null, ( matcherOut = [] ), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) && + ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { + + seed[ temp ] = !( results[ temp ] = elem ); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + } ); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[ 0 ].type ], + implicitRelative = leadingRelative || Expr.relative[ " " ], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + ( checkContext = context ).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { + matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; + } else { + matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[ j ].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens + .slice( 0, i - 1 ) + .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), + + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), + len = elems.length; + + if ( outermost ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + outermostContext = context == document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( !context && elem.ownerDocument != document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( ( matcher = elementMatchers[ j++ ] ) ) { + if ( matcher( elem, context || document, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + + // They will have gone through all possible matchers + if ( ( elem = !matcher && elem ) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( ( matcher = setMatchers[ j++ ] ) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !( unmatched[ i ] || setMatched[ i ] ) ) { + setMatched[ i ] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[ i ] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( + selector, + matcherFromGroupMatchers( elementMatchers, setMatchers ) + ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( ( selector = compiled.selector || selector ) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[ 0 ] = match[ 0 ].slice( 0 ); + if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { + + context = ( Expr.find[ "ID" ]( token.matches[ 0 ] + .replace( runescape, funescape ), context ) || [] )[ 0 ]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[ i ]; + + // Abort if we hit a combinator + if ( Expr.relative[ ( type = token.type ) ] ) { + break; + } + if ( ( find = Expr.find[ type ] ) ) { + + // Search, expanding context for leading sibling combinators + if ( ( seed = find( + token.matches[ 0 ].replace( runescape, funescape ), + rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || + context + ) ) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert( function( el ) { + + // Should return 1, but returns 4 (following) + return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; +} ); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert( function( el ) { + el.innerHTML = ""; + return el.firstChild.getAttribute( "href" ) === "#"; +} ) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + } ); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert( function( el ) { + el.innerHTML = ""; + el.firstChild.setAttribute( "value", "" ); + return el.firstChild.getAttribute( "value" ) === ""; +} ) ) { + addHandle( "value", function( elem, _name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + } ); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert( function( el ) { + return el.getAttribute( "disabled" ) == null; +} ) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; + } + } ); +} + +return Sizzle; + +} )( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; + +// Deprecated +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; +jQuery.escapeSelector = Sizzle.escape; + + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + + + +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +}; +var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); + + + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + return !!qualifier.call( elem, i, elem ) !== not; + } ); + } + + // Single element + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + } + + // Arraylike of elements (jQuery, arguments, Array) + if ( typeof qualifier !== "string" ) { + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not; + } ); + } + + // Filtered directly for both simple and complex selectors + return jQuery.filter( qualifier, elements, not ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, ret, + len = this.length, + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + ret = this.pushStack( [] ); + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + return len > 1 ? jQuery.uniqueSort( ret ) : ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[ 0 ] === "<" && + selector[ selector.length - 1 ] === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // Option to run scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + if ( elem ) { + + // Inject the element directly into the jQuery object + this[ 0 ] = elem; + this.length = 1; + } + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( isFunction( selector ) ) { + return root.ready !== undefined ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // Methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter( function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + targets = typeof selectors !== "string" && jQuery( selectors ); + + // Positional selectors never match, since there's no _selection_ context + if ( !rneedsContext.test( selectors ) ) { + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( targets ? + targets.index( cur ) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within the set + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // Index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, _i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, _i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, _i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + if ( elem.contentDocument != null && + + // Support: IE 11+ + // elements with no `data` attribute has an object + // `contentDocument` with a `null` prototype. + getProto( elem.contentDocument ) ) { + + return elem.contentDocument; + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } + + return jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.uniqueSort( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +} ); +var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = locked || options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && toType( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = queue = []; + if ( !memory && !firing ) { + list = memory = ""; + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +function Identity( v ) { + return v; +} +function Thrower( ex ) { + throw ex; +} + +function adoptValue( value, resolve, reject, noValue ) { + var method; + + try { + + // Check for promise aspect first to privilege synchronous behavior + if ( value && isFunction( ( method = value.promise ) ) ) { + method.call( value ).done( resolve ).fail( reject ); + + // Other thenables + } else if ( value && isFunction( ( method = value.then ) ) ) { + method.call( value, resolve, reject ); + + // Other non-thenables + } else { + + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply( undefined, [ value ].slice( noValue ) ); + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch ( value ) { + + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply( undefined, [ value ] ); + } +} + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + [ "notify", "progress", jQuery.Callbacks( "memory" ), + jQuery.Callbacks( "memory" ), 2 ], + [ "resolve", "done", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 0, "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 1, "rejected" ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + "catch": function( fn ) { + return promise.then( null, fn ); + }, + + // Keep pipe for back-compat + pipe: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( _i, tuple ) { + + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + then: function( onFulfilled, onRejected, onProgress ) { + var maxDepth = 0; + function resolve( depth, deferred, handler, special ) { + return function() { + var that = this, + args = arguments, + mightThrow = function() { + var returned, then; + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if ( depth < maxDepth ) { + return; + } + + returned = handler.apply( that, args ); + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if ( returned === deferred.promise() ) { + throw new TypeError( "Thenable self-resolution" ); + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && + + // Support: Promises/A+ section 2.3.4 + // https://promisesaplus.com/#point-64 + // Only check objects and functions for thenability + ( typeof returned === "object" || + typeof returned === "function" ) && + returned.then; + + // Handle a returned thenable + if ( isFunction( then ) ) { + + // Special processors (notify) just wait for resolution + if ( special ) { + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ) + ); + + // Normal processors (resolve) also hook into progress + } else { + + // ...and disregard older resolution values + maxDepth++; + + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ), + resolve( maxDepth, deferred, Identity, + deferred.notifyWith ) + ); + } + + // Handle all other returned values + } else { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Identity ) { + that = undefined; + args = [ returned ]; + } + + // Process the value(s) + // Default process is resolve + ( special || deferred.resolveWith )( that, args ); + } + }, + + // Only normal processors (resolve) catch and reject exceptions + process = special ? + mightThrow : + function() { + try { + mightThrow(); + } catch ( e ) { + + if ( jQuery.Deferred.exceptionHook ) { + jQuery.Deferred.exceptionHook( e, + process.stackTrace ); + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if ( depth + 1 >= maxDepth ) { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Thrower ) { + that = undefined; + args = [ e ]; + } + + deferred.rejectWith( that, args ); + } + } + }; + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if ( depth ) { + process(); + } else { + + // Call an optional hook to record the stack, in case of exception + // since it's otherwise lost when execution goes async + if ( jQuery.Deferred.getStackHook ) { + process.stackTrace = jQuery.Deferred.getStackHook(); + } + window.setTimeout( process ); + } + }; + } + + return jQuery.Deferred( function( newDefer ) { + + // progress_handlers.add( ... ) + tuples[ 0 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onProgress ) ? + onProgress : + Identity, + newDefer.notifyWith + ) + ); + + // fulfilled_handlers.add( ... ) + tuples[ 1 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onFulfilled ) ? + onFulfilled : + Identity + ) + ); + + // rejected_handlers.add( ... ) + tuples[ 2 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onRejected ) ? + onRejected : + Thrower + ) + ); + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 5 ]; + + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( + function() { + + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString; + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[ 3 - i ][ 2 ].disable, + + // rejected_handlers.disable + // fulfilled_handlers.disable + tuples[ 3 - i ][ 3 ].disable, + + // progress_callbacks.lock + tuples[ 0 ][ 2 ].lock, + + // progress_handlers.lock + tuples[ 0 ][ 3 ].lock + ); + } + + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add( tuple[ 3 ].fire ); + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); + return this; + }; + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( singleValue ) { + var + + // count of uncompleted subordinates + remaining = arguments.length, + + // count of unprocessed arguments + i = remaining, + + // subordinate fulfillment data + resolveContexts = Array( i ), + resolveValues = slice.call( arguments ), + + // the master Deferred + master = jQuery.Deferred(), + + // subordinate callback factory + updateFunc = function( i ) { + return function( value ) { + resolveContexts[ i ] = this; + resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( !( --remaining ) ) { + master.resolveWith( resolveContexts, resolveValues ); + } + }; + }; + + // Single- and empty arguments are adopted like Promise.resolve + if ( remaining <= 1 ) { + adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, + !remaining ); + + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if ( master.state() === "pending" || + isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + + return master.then(); + } + } + + // Multiple arguments are aggregated like Promise.all array elements + while ( i-- ) { + adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); + } + + return master.promise(); + } +} ); + + +// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + +jQuery.Deferred.exceptionHook = function( error, stack ) { + + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { + window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); + } +}; + + + + +jQuery.readyException = function( error ) { + window.setTimeout( function() { + throw error; + } ); +}; + + + + +// The deferred used on DOM ready +var readyList = jQuery.Deferred(); + +jQuery.fn.ready = function( fn ) { + + readyList + .then( fn ) + + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch( function( error ) { + jQuery.readyException( error ); + } ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + } +} ); + +jQuery.ready.then = readyList.then; + +// The ready event handler and self cleanup method +function completed() { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + jQuery.ready(); +} + +// Catch cases where $(document).ready() is called +// after the browser event has already occurred. +// Support: IE <=9 - 10 only +// Older IE sometimes signals "interactive" too soon +if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + +} else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); +} + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( toType( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, _key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( + elems[ i ], key, raw ? + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + if ( chainable ) { + return elems; + } + + // Gets + if ( bulk ) { + return fn.call( elems ); + } + + return len ? fn( elems[ 0 ], key ) : emptyGet; +}; + + +// Matches dashed string for camelizing +var rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g; + +// Used by camelCase as callback to replace() +function fcamelCase( _all, letter ) { + return letter.toUpperCase(); +} + +// Convert dashed to camelCase; used by the css and data modules +// Support: IE <=9 - 11, Edge 12 - 15 +// Microsoft forgot to hump their vendor prefix (#9572) +function camelCase( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); +} +var acceptData = function( owner ) { + + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + + + +function Data() { + this.expando = jQuery.expando + Data.uid++; +} + +Data.uid = 1; + +Data.prototype = { + + cache: function( owner ) { + + // Check if the owner object already has a cache + var value = owner[ this.expando ]; + + // If not, create one + if ( !value ) { + value = {}; + + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return an empty object. + if ( acceptData( owner ) ) { + + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if ( owner.nodeType ) { + owner[ this.expando ] = value; + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty( owner, this.expando, { + value: value, + configurable: true + } ); + } + } + } + + return value; + }, + set: function( owner, data, value ) { + var prop, + cache = this.cache( owner ); + + // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) + if ( typeof data === "string" ) { + cache[ camelCase( data ) ] = value; + + // Handle: [ owner, { properties } ] args + } else { + + // Copy the properties one-by-one to the cache object + for ( prop in data ) { + cache[ camelCase( prop ) ] = data[ prop ]; + } + } + return cache; + }, + get: function( owner, key ) { + return key === undefined ? + this.cache( owner ) : + + // Always use camelCase key (gh-2257) + owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; + }, + access: function( owner, key, value ) { + + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ( ( key && typeof key === "string" ) && value === undefined ) ) { + + return this.get( owner, key ); + } + + // When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, + cache = owner[ this.expando ]; + + if ( cache === undefined ) { + return; + } + + if ( key !== undefined ) { + + // Support array or space separated string of keys + if ( Array.isArray( key ) ) { + + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map( camelCase ); + } else { + key = camelCase( key ); + + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache ? + [ key ] : + ( key.match( rnothtmlwhite ) || [] ); + } + + i = key.length; + + while ( i-- ) { + delete cache[ key[ i ] ]; + } + } + + // Remove the expando if there's no more data + if ( key === undefined || jQuery.isEmptyObject( cache ) ) { + + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if ( owner.nodeType ) { + owner[ this.expando ] = undefined; + } else { + delete owner[ this.expando ]; + } + } + }, + hasData: function( owner ) { + var cache = owner[ this.expando ]; + return cache !== undefined && !jQuery.isEmptyObject( cache ); + } +}; +var dataPriv = new Data(); + +var dataUser = new Data(); + + + +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /[A-Z]/g; + +function getData( data ) { + if ( data === "true" ) { + return true; + } + + if ( data === "false" ) { + return false; + } + + if ( data === "null" ) { + return null; + } + + // Only convert to a number if it doesn't change the string + if ( data === +data + "" ) { + return +data; + } + + if ( rbrace.test( data ) ) { + return JSON.parse( data ); + } + + return data; +} + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = getData( data ); + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + dataUser.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend( { + hasData: function( elem ) { + return dataUser.hasData( elem ) || dataPriv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return dataUser.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + dataUser.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to dataPriv methods, these can be deprecated. + _data: function( elem, name, data ) { + return dataPriv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + dataPriv.remove( elem, name ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = dataUser.get( elem ); + + if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE 11 only + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + dataPriv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + dataUser.set( this, key ); + } ); + } + + return access( this, function( value ) { + var data; + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + + // Attempt to get data from the cache + // The key will always be camelCased in Data + data = dataUser.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, key ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each( function() { + + // We always store the camelCased key + dataUser.set( this, key, value ); + } ); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each( function() { + dataUser.remove( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = dataPriv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || Array.isArray( data ) ) { + queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // Clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // Not public - generate a queueHooks object, or return the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + dataPriv.remove( elem, [ type + "queue", key ] ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // Ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var documentElement = document.documentElement; + + + + var isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ); + }, + composed = { composed: true }; + + // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only + // Check attachment across shadow DOM boundaries when possible (gh-3504) + // Support: iOS 10.0-10.2 only + // Early iOS 10 versions support `attachShadow` but not `getRootNode`, + // leading to errors. We need to check for `getRootNode`. + if ( documentElement.getRootNode ) { + isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ) || + elem.getRootNode( composed ) === elem.ownerDocument; + }; + } +var isHiddenWithinTree = function( elem, el ) { + + // isHiddenWithinTree might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + + // Inline style trumps all + return elem.style.display === "none" || + elem.style.display === "" && + + // Otherwise, check computed style + // Support: Firefox <=43 - 45 + // Disconnected elements can have computed display: none, so first confirm that elem is + // in the document. + isAttached( elem ) && + + jQuery.css( elem, "display" ) === "none"; + }; + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, scale, + maxIterations = 20, + currentValue = tween ? + function() { + return tween.cur(); + } : + function() { + return jQuery.css( elem, prop, "" ); + }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = elem.nodeType && + ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Support: Firefox <=54 + // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) + initial = initial / 2; + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + while ( maxIterations-- ) { + + // Evaluate and update our best guess (doubling guesses that zero out). + // Finish if the scale equals or crosses 1 (making the old*new product non-positive). + jQuery.style( elem, prop, initialInUnit + unit ); + if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { + maxIterations = 0; + } + initialInUnit = initialInUnit / scale; + + } + + initialInUnit = initialInUnit * 2; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +var defaultDisplayMap = {}; + +function getDefaultDisplay( elem ) { + var temp, + doc = elem.ownerDocument, + nodeName = elem.nodeName, + display = defaultDisplayMap[ nodeName ]; + + if ( display ) { + return display; + } + + temp = doc.body.appendChild( doc.createElement( nodeName ) ); + display = jQuery.css( temp, "display" ); + + temp.parentNode.removeChild( temp ); + + if ( display === "none" ) { + display = "block"; + } + defaultDisplayMap[ nodeName ] = display; + + return display; +} + +function showHide( elements, show ) { + var display, elem, + values = [], + index = 0, + length = elements.length; + + // Determine new display value for elements that need to change + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + display = elem.style.display; + if ( show ) { + + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if ( display === "none" ) { + values[ index ] = dataPriv.get( elem, "display" ) || null; + if ( !values[ index ] ) { + elem.style.display = ""; + } + } + if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { + values[ index ] = getDefaultDisplay( elem ); + } + } else { + if ( display !== "none" ) { + values[ index ] = "none"; + + // Remember what we're overwriting + dataPriv.set( elem, "display", display ); + } + } + } + + // Set the display of the elements in a second loop to avoid constant reflow + for ( index = 0; index < length; index++ ) { + if ( values[ index ] != null ) { + elements[ index ].style.display = values[ index ]; + } + } + + return elements; +} + +jQuery.fn.extend( { + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each( function() { + if ( isHiddenWithinTree( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + } ); + } +} ); +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); + +var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); + + + +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // Support: IE <=9 only + // IE <=9 replaces "; + support.option = !!div.lastChild; +} )(); + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting or other required elements. + thead: [ 1, "", "
" ], + col: [ 2, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + _default: [ 0, "", "" ] +}; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// Support: IE <=9 only +if ( !support.option ) { + wrapMap.optgroup = wrapMap.option = [ 1, "" ]; +} + + +function getAll( context, tag ) { + + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret; + + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); + + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); + + } else { + ret = []; + } + + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } + + return ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, attached, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( toType( elem ) === "object" ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + attached = isAttached( elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( attached ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +var + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE <=9 - 11+ +// focus() and blur() are asynchronous, except when they are no-op. +// So expect focus to be synchronous when the element is already active, +// and blur to be synchronous when the element is not already active. +// (focus and blur are always synchronous in other supported browsers, +// this just defines when we can count on it). +function expectSync( elem, type ) { + return ( elem === safeActiveElement() ) === ( type === "focus" ); +} + +// Support: IE <=9 only +// Accessing document.activeElement can throw unexpectedly +// https://bugs.jquery.com/ticket/13393 +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Only attach events to objects that accept data + if ( !acceptData( elem ) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = Object.create( null ); + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove data and the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + dataPriv.remove( elem, "handle events" ); + } + }, + + dispatch: function( nativeEvent ) { + + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( nativeEvent ), + + handlers = ( + dataPriv.get( this, "events" ) || Object.create( null ) + )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; + } + + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // If the event is namespaced, then each handler is only invoked if it is + // specially universal or its namespaces are a superset of the event's. + if ( !event.rnamespace || handleObj.namespace === false || + event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, handleObj, sel, matchedHandlers, matchedSelectors, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); + } + } + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + cur = this; + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, + + get: isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, + + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); + } + } ); + }, + + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + click: { + + // Utilize native event to ensure correct state for checkable inputs + setup: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Claim the first handler + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + // dataPriv.set( el, "click", ... ) + leverageNative( el, "click", returnTrue ); + } + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Force setup before triggering a click + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + leverageNative( el, "click" ); + } + + // Return non-false to allow normal event-path propagation + return true; + }, + + // For cross-browser consistency, suppress native .click() on links + // Also prevent it if we're currently inside a leveraged native-event stack + _default: function( event ) { + var target = event.target; + return rcheckableType.test( target.type ) && + target.click && nodeName( target, "input" ) && + dataPriv.get( target, "click" ) || + nodeName( target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + } +}; + +// Ensure the presence of an event listener that handles manually-triggered +// synthetic events by interrupting progress until reinvoked in response to +// *native* events that it fires directly, ensuring that state changes have +// already occurred before other listeners are invoked. +function leverageNative( el, type, expectSync ) { + + // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add + if ( !expectSync ) { + if ( dataPriv.get( el, type ) === undefined ) { + jQuery.event.add( el, type, returnTrue ); + } + return; + } + + // Register the controller as a special universal handler for all event namespaces + dataPriv.set( el, type, false ); + jQuery.event.add( el, type, { + namespace: false, + handler: function( event ) { + var notAsync, result, + saved = dataPriv.get( this, type ); + + if ( ( event.isTrigger & 1 ) && this[ type ] ) { + + // Interrupt processing of the outer synthetic .trigger()ed event + // Saved data should be false in such cases, but might be a leftover capture object + // from an async native handler (gh-4350) + if ( !saved.length ) { + + // Store arguments for use when handling the inner native event + // There will always be at least one argument (an event object), so this array + // will not be confused with a leftover capture object. + saved = slice.call( arguments ); + dataPriv.set( this, type, saved ); + + // Trigger the native event and capture its result + // Support: IE <=9 - 11+ + // focus() and blur() are asynchronous + notAsync = expectSync( this, type ); + this[ type ](); + result = dataPriv.get( this, type ); + if ( saved !== result || notAsync ) { + dataPriv.set( this, type, false ); + } else { + result = {}; + } + if ( saved !== result ) { + + // Cancel the outer synthetic event + event.stopImmediatePropagation(); + event.preventDefault(); + return result.value; + } + + // If this is an inner synthetic event for an event with a bubbling surrogate + // (focus or blur), assume that the surrogate already propagated from triggering the + // native event and prevent that from happening again here. + // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the + // bubbling surrogate propagates *after* the non-bubbling base), but that seems + // less bad than duplication. + } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { + event.stopPropagation(); + } + + // If this is a native event triggered above, everything is now in order + // Fire an inner synthetic event with the original arguments + } else if ( saved.length ) { + + // ...and capture the result + dataPriv.set( this, type, { + value: jQuery.event.trigger( + + // Support: IE <=9 - 11+ + // Extend with the prototype to reset the above stopImmediatePropagation() + jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), + saved.slice( 1 ), + this + ) + } ); + + // Abort handling of the native event + event.stopImmediatePropagation(); + } + } + } ); +} + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android <=2.3 only + src.returnValue === false ? + returnTrue : + returnFalse; + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (#504, #13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || Date.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && !this.isSimulated ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + code: true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + + which: function( event ) { + var button = event.button; + + // Add which for key events + if ( event.which == null && rkeyEvent.test( event.type ) ) { + return event.charCode != null ? event.charCode : event.keyCode; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { + if ( button & 1 ) { + return 1; + } + + if ( button & 2 ) { + return 3; + } + + if ( button & 4 ) { + return 2; + } + + return 0; + } + + return event.which; + } +}, jQuery.event.addProp ); + +jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { + jQuery.event.special[ type ] = { + + // Utilize native event if possible so blur/focus sequence is correct + setup: function() { + + // Claim the first handler + // dataPriv.set( this, "focus", ... ) + // dataPriv.set( this, "blur", ... ) + leverageNative( this, type, expectSync ); + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function() { + + // Force setup before trigger + leverageNative( this, type ); + + // Return non-false to allow normal event-path propagation + return true; + }, + + delegateType: delegateType + }; +} ); + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + } +} ); + + +var + + // Support: IE <=10 - 11, Edge 12 - 13 only + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g; + +// Prefer a tbody over its parent table for containing new rows +function manipulationTarget( elem, content ) { + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { + + return jQuery( elem ).children( "tbody" )[ 0 ] || elem; + } + + return elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { + elem.type = elem.type.slice( 5 ); + } else { + elem.removeAttribute( "type" ); + } + + return elem; +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.get( src ); + events = pdataOld.events; + + if ( events ) { + dataPriv.remove( dest, "handle events" ); + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + dataUser.set( dest, udataCur ); + } +} + +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = flat( args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + valueIsFunction = isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( valueIsFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( valueIsFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl && !node.noModule ) { + jQuery._evalUrl( node.src, { + nonce: node.nonce || node.getAttribute( "nonce" ) + }, doc ); + } + } else { + DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && isAttached( node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html; + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = isAttached( elem ); + + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; + + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } + } + } + } +} ); + +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); + +var getStyles = function( elem ) { + + // Support: IE <=11 only, Firefox <=30 (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; + +var swap = function( elem, options, callback ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + + +var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); + + + +( function() { + + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { + + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } + + container.style.cssText = "position:absolute;left:-11111px;width:60px;" + + "margin-top:1px;padding:0;border:0"; + div.style.cssText = + "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + + "margin:auto;border:1px;padding:1px;" + + "width:60%;top:1%"; + documentElement.appendChild( container ).appendChild( div ); + + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; + + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 + // Some styles come back with percentage values, even though they shouldn't + div.style.right = "60%"; + pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; + + // Support: IE 9 - 11 only + // Detect misreporting of content dimensions for box-sizing:border-box elements + boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; + + // Support: IE 9 only + // Detect overflow:scroll screwiness (gh-3699) + // Support: Chrome <=64 + // Don't get tricked when zoom affects offsetWidth (gh-4029) + div.style.position = "absolute"; + scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; + + documentElement.removeChild( container ); + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } + + function roundPixelMeasures( measure ) { + return Math.round( parseFloat( measure ) ); + } + + var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, + reliableTrDimensionsVal, reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + jQuery.extend( support, { + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelBoxStyles: function() { + computeStyleTests(); + return pixelBoxStylesVal; + }, + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + }, + scrollboxSize: function() { + computeStyleTests(); + return scrollboxSizeVal; + }, + + // Support: IE 9 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Behavior in IE 9 is more subtle than in newer versions & it passes + // some versions of this test; make sure not to make it pass there! + reliableTrDimensions: function() { + var table, tr, trChild, trStyle; + if ( reliableTrDimensionsVal == null ) { + table = document.createElement( "table" ); + tr = document.createElement( "tr" ); + trChild = document.createElement( "div" ); + + table.style.cssText = "position:absolute;left:-11111px"; + tr.style.height = "1px"; + trChild.style.height = "9px"; + + documentElement + .appendChild( table ) + .appendChild( tr ) + .appendChild( trChild ); + + trStyle = window.getComputedStyle( tr ); + reliableTrDimensionsVal = parseInt( trStyle.height ) > 3; + + documentElement.removeChild( table ); + } + return reliableTrDimensionsVal; + } + } ); +} )(); + + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( ret === "" && !isAttached( elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + + +function addGetHookIf( conditionFn, hookFn ) { + + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { + + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + return ( this.get = hookFn ).apply( this, arguments ); + } + }; +} + + +var cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style, + vendorProps = {}; + +// Return a vendor-prefixed property or undefined +function vendorPropName( name ) { + + // Check for vendor prefixed names + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in emptyStyle ) { + return name; + } + } +} + +// Return a potentially-mapped jQuery.cssProps or vendor prefixed property +function finalPropName( name ) { + var final = jQuery.cssProps[ name ] || vendorProps[ name ]; + + if ( final ) { + return final; + } + if ( name in emptyStyle ) { + return name; + } + return vendorProps[ name ] = vendorPropName( name ) || name; +} + + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }; + +function setPositiveNumber( _elem, value, subtract ) { + + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); + return matches ? + + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : + value; +} + +function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { + var i = dimension === "width" ? 1 : 0, + extra = 0, + delta = 0; + + // Adjustment may not be necessary + if ( box === ( isBorderBox ? "border" : "content" ) ) { + return 0; + } + + for ( ; i < 4; i += 2 ) { + + // Both box models exclude margin + if ( box === "margin" ) { + delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); + } + + // If we get here with a content-box, we're seeking "padding" or "border" or "margin" + if ( !isBorderBox ) { + + // Add padding + delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // For "border" or "margin", add border + if ( box !== "padding" ) { + delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + + // But still keep track of it otherwise + } else { + extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + + // If we get here with a border-box (content + padding + border), we're seeking "content" or + // "padding" or "margin" + } else { + + // For "content", subtract padding + if ( box === "content" ) { + delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // For "content" or "padding", subtract border + if ( box !== "margin" ) { + delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + // Account for positive content-box scroll gutter when requested by providing computedVal + if ( !isBorderBox && computedVal >= 0 ) { + + // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border + // Assuming integer scroll gutter, subtract the rest and round down + delta += Math.max( 0, Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + computedVal - + delta - + extra - + 0.5 + + // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter + // Use an explicit zero to avoid NaN (gh-3964) + ) ) || 0; + } + + return delta; +} + +function getWidthOrHeight( elem, dimension, extra ) { + + // Start with computed style + var styles = getStyles( elem ), + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). + // Fake content-box until we know it's needed to know the true value. + boxSizingNeeded = !support.boxSizingReliable() || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + valueIsBorderBox = isBorderBox, + + val = curCSS( elem, dimension, styles ), + offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); + + // Support: Firefox <=54 + // Return a confounding non-pixel value or feign ignorance, as appropriate. + if ( rnumnonpx.test( val ) ) { + if ( !extra ) { + return val; + } + val = "auto"; + } + + + // Support: IE 9 - 11 only + // Use offsetWidth/offsetHeight for when box sizing is unreliable. + // In those cases, the computed value can be trusted to be border-box. + if ( ( !support.boxSizingReliable() && isBorderBox || + + // Support: IE 10 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Interestingly, in some cases IE 9 doesn't suffer from this issue. + !support.reliableTrDimensions() && nodeName( elem, "tr" ) || + + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + val === "auto" || + + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) + !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && + + // Make sure the element is visible & connected + elem.getClientRects().length ) { + + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // Where available, offsetWidth/offsetHeight approximate border box dimensions. + // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the + // retrieved value as a content box dimension. + valueIsBorderBox = offsetProp in elem; + if ( valueIsBorderBox ) { + val = elem[ offsetProp ]; + } + } + + // Normalize "" and auto + val = parseFloat( val ) || 0; + + // Adjust for the element's box model + return ( val + + boxModelAdjustment( + elem, + dimension, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles, + + // Provide the current computed size to request scroll gutter calculation (gh-3589) + val + ) + ) + "px"; +} + +jQuery.extend( { + + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "animationIterationCount": true, + "columnCount": true, + "fillOpacity": true, + "flexGrow": true, + "flexShrink": true, + "fontWeight": true, + "gridArea": true, + "gridColumn": true, + "gridColumnEnd": true, + "gridColumnStart": true, + "gridRow": true, + "gridRowEnd": true, + "gridRowStart": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: {}, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ), + style = elem.style; + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // Convert "+=" or "-=" to relative numbers (#7345) + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); + + // Fixes bug #9237 + type = "number"; + } + + // Make sure that null and NaN values aren't set (#7116) + if ( value == null || value !== value ) { + return; + } + + // If a number was passed in, add the unit (except for certain CSS properties) + // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append + // "px" to a few hardcoded values. + if ( type === "number" && !isCustomProp ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); + } + + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { + + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; + } + } + + } else { + + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { + + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ); + + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + // Convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Make numeric if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || isFinite( num ) ? num || 0 : val; + } + + return val; + } +} ); + +jQuery.each( [ "height", "width" ], function( _i, dimension ) { + jQuery.cssHooks[ dimension ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, dimension, extra ); + } ) : + getWidthOrHeight( elem, dimension, extra ); + } + }, + + set: function( elem, value, extra ) { + var matches, + styles = getStyles( elem ), + + // Only read styles.position if the test has a chance to fail + // to avoid forcing a reflow. + scrollboxSizeBuggy = !support.scrollboxSize() && + styles.position === "absolute", + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) + boxSizingNeeded = scrollboxSizeBuggy || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + subtract = extra ? + boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ) : + 0; + + // Account for unreliable border-box dimensions by comparing offset* to computed and + // faking a content-box to get border and padding (gh-3699) + if ( isBorderBox && scrollboxSizeBuggy ) { + subtract -= Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + parseFloat( styles[ dimension ] ) - + boxModelAdjustment( elem, dimension, "border", false, styles ) - + 0.5 + ); + } + + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { + + elem.style[ dimension ] = value; + value = jQuery.css( elem, dimension ); + } + + return setPositiveNumber( elem, value, subtract ); + } + }; +} ); + +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; + } + } +); + +// These hooks are used by animate to expand properties +jQuery.each( { + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // Assumes a single number if not a string + parts = typeof value === "string" ? value.split( " " ) : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( prefix !== "margin" ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +} ); + +jQuery.fn.extend( { + css: function( name, value ) { + return access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( Array.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + } +} ); + + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || jQuery.easing._default; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { + return tween.elem[ tween.prop ]; + } + + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css( tween.elem, tween.prop, "" ); + + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.nodeType === 1 && ( + jQuery.cssHooks[ tween.prop ] || + tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p * Math.PI ) / 2; + }, + _default: "swing" +}; + +jQuery.fx = Tween.prototype.init; + +// Back compat <1.8 extension point +jQuery.fx.step = {}; + + + + +var + fxNow, inProgress, + rfxtypes = /^(?:toggle|show|hide)$/, + rrun = /queueHooks$/; + +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); + } + + jQuery.fx.tick(); + } +} + +// Animations created synchronously will run synchronously +function createFxNow() { + window.setTimeout( function() { + fxNow = undefined; + } ); + return ( fxNow = Date.now() ); +} + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + i = 0, + attrs = { height: type }; + + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0; + for ( ; i < 4; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { + + // We're done with this property + return tween; + } + } +} + +function defaultPrefilter( elem, props, opts ) { + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); + + // Queue-skipping animations hijack the fx hooks + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always( function() { + + // Ensure the complete handler is called before this completes + anim.always( function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + } ); + } ); + } + + // Detect show/hide animations + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.test( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; + + // Ignore all other no-op show/hide data + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } + + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { + + // Support: IE <=9 - 11, Edge 12 - 15 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY and Edge just mirrors + // the overflowX value there. + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { + + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); + } + } + + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { + + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } + } + style.display = "inline-block"; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); + } + + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { + + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } + + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); + } + + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); + } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } + + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } + } + } +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( Array.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = Animation.prefilters.length, + deferred = jQuery.Deferred().always( function() { + + // Don't match elem in the :animated selector + delete tick.elem; + } ), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + + // If there's more to do, yield + if ( percent < 1 && length ) { + return remaining; + } + + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + } + + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; + }, + animation = deferred.promise( { + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // Resolve when we played the last frame; otherwise, reject + if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + } ), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + if ( isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + result.stop.bind( result ); + } + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + } ) + ); + + return animation; +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] + }, + + tweener: function( props, callback ) { + if ( isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.match( rnothtmlwhite ); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length; index++ ) { + prop = props[ index ]; + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); + } + }, + + prefilters: [ defaultPrefilter ], + + prefilter: function( callback, prepend ) { + if ( prepend ) { + Animation.prefilters.unshift( callback ); + } else { + Animation.prefilters.push( callback ); + } + } +} ); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !isFunction( easing ) && easing + }; + + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; + + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; + + } else { + opt.duration = jQuery.fx.speeds._default; + } + } + } + + // Normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.fn.extend( { + fadeTo: function( speed, to, easing, callback ) { + + // Show any hidden elements after setting opacity to 0 + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() + + // Animate to the value specified + .end().animate( { opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || dataPriv.get( this, "finish" ) ) { + anim.stop( true ); + } + }; + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue ) { + this.queue( type || "fx", [] ); + } + + return this.each( function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = dataPriv.get( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + } ); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each( function() { + var index, + data = dataPriv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // Enable finishing flag on private data + data.finish = true; + + // Empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // Look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // Look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // Turn off finishing flag + delete data.finish; + } ); + } +} ); + +jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +} ); + +// Generate shortcuts for custom animations +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +} ); + +jQuery.timers = []; +jQuery.fx.tick = function() { + var timer, + i = 0, + timers = jQuery.timers; + + fxNow = Date.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + + // Run the timer and safely remove it when done (allowing for external removal) + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + jQuery.timers.push( timer ); + jQuery.fx.start(); +}; + +jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( inProgress ) { + return; + } + + inProgress = true; + schedule(); +}; + +jQuery.fx.stop = function() { + inProgress = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + + // Default speed + _default: 400 +}; + + +// Based off of the plugin by Clint Helfers, with permission. +// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ +jQuery.fn.delay = function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = window.setTimeout( next, time ); + hooks.stop = function() { + window.clearTimeout( timeout ); + }; + } ); +}; + + +( function() { + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); + + input.type = "checkbox"; + + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; + + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected; + + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement( "input" ); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; +} )(); + + +var boolHook, + attrHandle = jQuery.expr.attrHandle; + +jQuery.fn.extend( { + attr: function( name, value ) { + return access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each( function() { + jQuery.removeAttr( this, name ); + } ); + } +} ); + +jQuery.extend( { + attr: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); + } + + if ( value !== undefined ) { + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + } + + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + elem.setAttribute( name, value + "" ); + return value; + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !support.radioValue && value === "radio" && + nodeName( elem, "input" ) ) { + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + removeAttr: function( elem, value ) { + var name, + i = 0, + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); + } + } + } +} ); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; + +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { + var getter = attrHandle[ name ] || jQuery.find.attr; + + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle, + lowercaseName = name.toLowerCase(); + + if ( !isXML ) { + + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; + ret = getter( elem, name, isXML ) != null ? + lowercaseName : + null; + attrHandle[ lowercaseName ] = handle; + } + return ret; + }; +} ); + + + + +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; + +jQuery.fn.extend( { + prop: function( name, value ) { + return access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each( function() { + delete this[ jQuery.propFix[ name ] || name ]; + } ); + } +} ); + +jQuery.extend( { + prop: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set properties on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + return ( elem[ name ] = value ); + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + return elem[ name ]; + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } + + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; + } + + return -1; + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop +if ( !support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + }, + set: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + }; +} + +jQuery.each( [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +} ); + + + + + // Strip and collapse whitespace according to HTML spec + // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } + + +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} + +function classesToArray( value ) { + if ( Array.isArray( value ) ) { + return value; + } + if ( typeof value === "string" ) { + return value.match( rnothtmlwhite ) || []; + } + return []; +} + +jQuery.fn.extend( { + addClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( !arguments.length ) { + return this.attr( "class", "" ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) > -1 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isValidValue = type === "string" || Array.isArray( value ); + + if ( typeof stateVal === "boolean" && isValidValue ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); + } + + return this.each( function() { + var className, i, self, classNames; + + if ( isValidValue ) { + + // Toggle individual class names + i = 0; + self = jQuery( this ); + classNames = classesToArray( value ); + + while ( ( className = classNames[ i++ ] ) ) { + + // Check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { + + // Store className if set + dataPriv.set( this, "__className__", className ); + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } + } + } ); + }, + + hasClass: function( selector ) { + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; + } + } + + return false; + } +} ); + + + + +var rreturn = /\r/g; + +jQuery.fn.extend( { + val: function( value ) { + var hooks, ret, valueIsFunction, + elem = this[ 0 ]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { + return ret; + } + + ret = elem.value; + + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; + } + + return; + } + + valueIsFunction = isFunction( value ); + + return this.each( function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( valueIsFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + + } else if ( typeof val === "number" ) { + val += ""; + + } else if ( Array.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + } ); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + } ); + } +} ); + +jQuery.extend( { + valHooks: { + option: { + get: function( elem ) { + + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + + // Support: IE <=10 - 11 only + // option.text throws exceptions (#14686, #14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, i, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one", + values = one ? null : [], + max = one ? index + 1 : options.length; + + if ( index < 0 ) { + i = max; + + } else { + i = one ? index : 0; + } + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + + // Don't return options that are disabled or in a disabled optgroup + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + + /* eslint-disable no-cond-assign */ + + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { + optionSet = true; + } + + /* eslint-enable no-cond-assign */ + } + + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + } +} ); + +// Radios and checkboxes getter/setter +jQuery.each( [ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute( "value" ) === null ? "on" : elem.value; + }; + } +} ); + + + + +// Return jQuery for attributes-only inclusion + + +support.focusin = "onfocusin" in window; + + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + stopPropagationCallback = function( e ) { + e.stopPropagation(); + }; + +jQuery.extend( jQuery.event, { + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = lastElement = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + lastElement = cur; + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( + dataPriv.get( cur, "events" ) || Object.create( null ) + )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + + if ( event.isPropagationStopped() ) { + lastElement.addEventListener( type, stopPropagationCallback ); + } + + elem[ type ](); + + if ( event.isPropagationStopped() ) { + lastElement.removeEventListener( type, stopPropagationCallback ); + } + + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ); + + jQuery.event.trigger( e, null, elem ); + } + +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +// Support: Firefox <=44 +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + + // Handle: regular nodes (via `this.ownerDocument`), window + // (via `this.document`) & document (via `this`). + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + dataPriv.remove( doc, fix ); + + } else { + dataPriv.access( doc, fix, attaches ); + } + } + }; + } ); +} +var location = window.location; + +var nonce = { guid: Date.now() }; + +var rquery = ( /\?/ ); + + + +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); + } catch ( e ) { + xml = undefined; + } + + if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; +}; + + +var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( Array.isArray( obj ) ) { + + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); + } + } ); + + } else if ( !traditional && toType( obj ) === "object" ) { + + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + + // Serialize scalar item. + add( prefix, obj ); + } +} + +// Serialize an array of form elements or a set of +// key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); + }; + + if ( a == null ) { + return ""; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + } ); + + } else { + + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ); +}; + +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { + + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ) + .filter( function() { + var type = this.type; + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ) + .map( function( _i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; + } + + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } + + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); + } +} ); + + +var + r20 = /%20/g, + rhash = /#.*$/, + rantiCache = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat( "*" ), + + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); + originAnchor.href = location.href; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( isFunction( func ) ) { + + // For each dataType in the dataTypeExpression + while ( ( dataType = dataTypes[ i++ ] ) ) { + + // Prepend if requested + if ( dataType[ 0 ] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); + + // Otherwise append + } else { + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + } ); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while ( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s.throws ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} + +jQuery.extend( { + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: location.href, + type: "GET", + isLocal: rlocalProtocol.test( location.protocol ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": JSON.parse, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var transport, + + // URL without anti-cache param + cacheURL, + + // Response headers + responseHeadersString, + responseHeaders, + + // timeout handle + timeoutTimer, + + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + + // To know if global events are to be dispatched + fireGlobals, + + // Loop variable + i, + + // uncached part of the url + uncached, + + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + + // Callbacks context + callbackContext = s.context || s, + + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + + // Status-dependent callbacks + statusCode = s.statusCode || {}, + + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + + // Default abort message + strAbort = "canceled", + + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( completed ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() + " " ] = + ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) + .concat( match[ 2 ] ); + } + } + match = responseHeaders[ key.toLowerCase() + " " ]; + } + return match == null ? null : match.join( ", " ); + }, + + // Raw string + getAllResponseHeaders: function() { + return completed ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( completed == null ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( completed ) { + + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones + for ( code in map ) { + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ); + + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; + + // A cross-domain request is in order when the origin doesn't match the current origin. + if ( s.crossDomain == null ) { + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 15 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( completed ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available and should be processed, append data to url + if ( s.data && ( s.processData || typeof s.data === "string" ) ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add or update anti-cache param if needed + if ( s.cache === false ) { + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + + uncached; + } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + + // Abort if not done already and return + return jqXHR.abort(); + } + + // Aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + completed = false; + transport.send( requestHeaders, done ); + } catch ( e ) { + + // Rethrow post-completion exceptions + if ( completed ) { + throw e; + } + + // Propagate others as results + done( -1, e ); + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Ignore repeat invocations + if ( completed ) { + return; + } + + completed = true; + + // Clear timeout if it exists + if ( timeoutTimer ) { + window.clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Use a noop converter for missing script + if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) { + s.converters[ "text script" ] = function() {}; + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader( "Last-Modified" ); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader( "etag" ); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + + // Extract error from statusText and normalize for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +} ); + +jQuery.each( [ "get", "post" ], function( _i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + + // Shift arguments if data argument was omitted + if ( isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject( url ) && url ) ); + }; +} ); + +jQuery.ajaxPrefilter( function( s ) { + var i; + for ( i in s.headers ) { + if ( i.toLowerCase() === "content-type" ) { + s.contentType = s.headers[ i ] || ""; + } + } +} ); + + +jQuery._evalUrl = function( url, options, doc ) { + return jQuery.ajax( { + url: url, + + // Make this explicit, since user can override this through ajaxSetup (#11264) + type: "GET", + dataType: "script", + cache: true, + async: false, + global: false, + + // Only evaluate the response if it is successful (gh-4126) + // dataFilter is not invoked for failure responses, so using it instead + // of the default converter is kludgy but it works. + converters: { + "text script": function() {} + }, + dataFilter: function( response ) { + jQuery.globalEval( response, options, doc ); + } + } ); +}; + + +jQuery.fn.extend( { + wrapAll: function( html ) { + var wrap; + + if ( this[ 0 ] ) { + if ( isFunction( html ) ) { + html = html.call( this[ 0 ] ); + } + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map( function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + } ).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); + } + + return this.each( function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + } ); + }, + + wrap: function( html ) { + var htmlIsFunction = isFunction( html ); + + return this.each( function( i ) { + jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); + } ); + }, + + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; + } +} ); + + +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); +}; +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); +}; + + + + +jQuery.ajaxSettings.xhr = function() { + try { + return new window.XMLHttpRequest(); + } catch ( e ) {} +}; + +var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 + 0: 200, + + // Support: IE <=9 only + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + xhrSupported = jQuery.ajaxSettings.xhr(); + +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; + + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(); + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); + + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.ontimeout = + xhr.onreadystatechange = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see #8605, #14207 + xhr.status, + xhr.statusText + ); + } + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + + // Listen to events + xhr.onload = callback(); + errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); + } + }; + } + + // Create the abort callback + callback = callback( "abort" ); + + try { + + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + + // #14683: Only rethrow if this hasn't been notified as an error yet + if ( callback ) { + throw e; + } + } + }, + + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +} ); + + + + +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; + } +} ); + +// Install script dataType +jQuery.ajaxSetup( { + accepts: { + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /\b(?:java|ecma)script\b/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +} ); + +// Handle cache's special case and crossDomain +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + } +} ); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function( s ) { + + // This transport only deals with cross domain or forced-by-attrs requests + if ( s.crossDomain || s.scriptAttrs ) { + var script, callback; + return { + send: function( _, complete ) { + script = jQuery( "\r\n"; + +// inject VBScript +document.write(IEBinaryToArray_ByteStr_Script); + +global.JSZipUtils._getBinaryFromXHR = function (xhr) { + var binary = xhr.responseBody; + var byteMapping = {}; + for ( var i = 0; i < 256; i++ ) { + for ( var j = 0; j < 256; j++ ) { + byteMapping[ String.fromCharCode( i + (j << 8) ) ] = + String.fromCharCode(i) + String.fromCharCode(j); + } + } + var rawBytes = IEBinaryToArray_ByteStr(binary); + var lastChr = IEBinaryToArray_ByteStr_Last(binary); + return rawBytes.replace(/[\s\S]/g, function( match ) { + return byteMapping[match]; + }) + lastChr; +}; + +// enforcing Stuk's coding style +// vim: set shiftwidth=4 softtabstop=4: + +},{}]},{},[1]) +; diff --git a/javadoc/0.17-alpha3/jquery/jszip-utils/dist/jszip-utils-ie.min.js b/javadoc/0.17-alpha3/jquery/jszip-utils/dist/jszip-utils-ie.min.js new file mode 100644 index 000000000..93d8bc8ef --- /dev/null +++ b/javadoc/0.17-alpha3/jquery/jszip-utils/dist/jszip-utils-ie.min.js @@ -0,0 +1,10 @@ +/*! + +JSZipUtils - A collection of cross-browser utilities to go along with JSZip. + + +(c) 2014 Stuart Knightley, David Duponchel +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown. + +*/ +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g\r\n";document.write(b),a.JSZipUtils._getBinaryFromXHR=function(a){for(var b=a.responseBody,c={},d=0;256>d;d++)for(var e=0;256>e;e++)c[String.fromCharCode(d+(e<<8))]=String.fromCharCode(d)+String.fromCharCode(e);var f=IEBinaryToArray_ByteStr(b),g=IEBinaryToArray_ByteStr_Last(b);return f.replace(/[\s\S]/g,function(a){return c[a]})+g}},{}]},{},[1]); diff --git a/javadoc/0.17-alpha3/jquery/jszip-utils/dist/jszip-utils.js b/javadoc/0.17-alpha3/jquery/jszip-utils/dist/jszip-utils.js new file mode 100644 index 000000000..775895ec9 --- /dev/null +++ b/javadoc/0.17-alpha3/jquery/jszip-utils/dist/jszip-utils.js @@ -0,0 +1,118 @@ +/*! + +JSZipUtils - A collection of cross-browser utilities to go along with JSZip. + + +(c) 2014 Stuart Knightley, David Duponchel +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown. + +*/ +!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.JSZipUtils=e():"undefined"!=typeof global?global.JSZipUtils=e():"undefined"!=typeof self&&(self.JSZipUtils=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o + +(c) 2014 Stuart Knightley, David Duponchel +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown. + +*/ +!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.JSZipUtils=a():"undefined"!=typeof global?global.JSZipUtils=a():"undefined"!=typeof self&&(self.JSZipUtils=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g + +(c) 2009-2016 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. + +JSZip uses the library pako released under the MIT license : +https://github.com/nodeca/pako/blob/master/LICENSE +*/ + +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSZip = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o> 2; + enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); + enc3 = remainingBytes > 1 ? (((chr2 & 15) << 2) | (chr3 >> 6)) : 64; + enc4 = remainingBytes > 2 ? (chr3 & 63) : 64; + + output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4)); + + } + + return output.join(""); +}; + +// public method for decoding +exports.decode = function(input) { + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0, resultIndex = 0; + + var dataUrlPrefix = "data:"; + + if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) { + // This is a common error: people give a data url + // (data:image/png;base64,iVBOR...) with a {base64: true} and + // wonders why things don't work. + // We can detect that the string input looks like a data url but we + // *can't* be sure it is one: removing everything up to the comma would + // be too dangerous. + throw new Error("Invalid base64 input, it looks like a data url."); + } + + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); + + var totalLength = input.length * 3 / 4; + if(input.charAt(input.length - 1) === _keyStr.charAt(64)) { + totalLength--; + } + if(input.charAt(input.length - 2) === _keyStr.charAt(64)) { + totalLength--; + } + if (totalLength % 1 !== 0) { + // totalLength is not an integer, the length does not match a valid + // base64 content. That can happen if: + // - the input is not a base64 content + // - the input is *almost* a base64 content, with a extra chars at the + // beginning or at the end + // - the input uses a base64 variant (base64url for example) + throw new Error("Invalid base64 input, bad content length."); + } + var output; + if (support.uint8array) { + output = new Uint8Array(totalLength|0); + } else { + output = new Array(totalLength|0); + } + + while (i < input.length) { + + enc1 = _keyStr.indexOf(input.charAt(i++)); + enc2 = _keyStr.indexOf(input.charAt(i++)); + enc3 = _keyStr.indexOf(input.charAt(i++)); + enc4 = _keyStr.indexOf(input.charAt(i++)); + + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + + output[resultIndex++] = chr1; + + if (enc3 !== 64) { + output[resultIndex++] = chr2; + } + if (enc4 !== 64) { + output[resultIndex++] = chr3; + } + + } + + return output; +}; + +},{"./support":30,"./utils":32}],2:[function(require,module,exports){ +'use strict'; + +var external = require("./external"); +var DataWorker = require('./stream/DataWorker'); +var Crc32Probe = require('./stream/Crc32Probe'); +var DataLengthProbe = require('./stream/DataLengthProbe'); + +/** + * Represent a compressed object, with everything needed to decompress it. + * @constructor + * @param {number} compressedSize the size of the data compressed. + * @param {number} uncompressedSize the size of the data after decompression. + * @param {number} crc32 the crc32 of the decompressed file. + * @param {object} compression the type of compression, see lib/compressions.js. + * @param {String|ArrayBuffer|Uint8Array|Buffer} data the compressed data. + */ +function CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) { + this.compressedSize = compressedSize; + this.uncompressedSize = uncompressedSize; + this.crc32 = crc32; + this.compression = compression; + this.compressedContent = data; +} + +CompressedObject.prototype = { + /** + * Create a worker to get the uncompressed content. + * @return {GenericWorker} the worker. + */ + getContentWorker: function () { + var worker = new DataWorker(external.Promise.resolve(this.compressedContent)) + .pipe(this.compression.uncompressWorker()) + .pipe(new DataLengthProbe("data_length")); + + var that = this; + worker.on("end", function () { + if (this.streamInfo['data_length'] !== that.uncompressedSize) { + throw new Error("Bug : uncompressed data size mismatch"); + } + }); + return worker; + }, + /** + * Create a worker to get the compressed content. + * @return {GenericWorker} the worker. + */ + getCompressedWorker: function () { + return new DataWorker(external.Promise.resolve(this.compressedContent)) + .withStreamInfo("compressedSize", this.compressedSize) + .withStreamInfo("uncompressedSize", this.uncompressedSize) + .withStreamInfo("crc32", this.crc32) + .withStreamInfo("compression", this.compression) + ; + } +}; + +/** + * Chain the given worker with other workers to compress the content with the + * given compression. + * @param {GenericWorker} uncompressedWorker the worker to pipe. + * @param {Object} compression the compression object. + * @param {Object} compressionOptions the options to use when compressing. + * @return {GenericWorker} the new worker compressing the content. + */ +CompressedObject.createWorkerFrom = function (uncompressedWorker, compression, compressionOptions) { + return uncompressedWorker + .pipe(new Crc32Probe()) + .pipe(new DataLengthProbe("uncompressedSize")) + .pipe(compression.compressWorker(compressionOptions)) + .pipe(new DataLengthProbe("compressedSize")) + .withStreamInfo("compression", compression); +}; + +module.exports = CompressedObject; + +},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(require,module,exports){ +'use strict'; + +var GenericWorker = require("./stream/GenericWorker"); + +exports.STORE = { + magic: "\x00\x00", + compressWorker : function (compressionOptions) { + return new GenericWorker("STORE compression"); + }, + uncompressWorker : function () { + return new GenericWorker("STORE decompression"); + } +}; +exports.DEFLATE = require('./flate'); + +},{"./flate":7,"./stream/GenericWorker":28}],4:[function(require,module,exports){ +'use strict'; + +var utils = require('./utils'); + +/** + * The following functions come from pako, from pako/lib/zlib/crc32.js + * released under the MIT license, see pako https://github.com/nodeca/pako/ + */ + +// Use ordinary array, since untyped makes no boost here +function makeTable() { + var c, table = []; + + for(var n =0; n < 256; n++){ + c = n; + for(var k =0; k < 8; k++){ + c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); + } + table[n] = c; + } + + return table; +} + +// Create table on load. Just 255 signed longs. Not a problem. +var crcTable = makeTable(); + + +function crc32(crc, buf, len, pos) { + var t = crcTable, end = pos + len; + + crc = crc ^ (-1); + + for (var i = pos; i < end; i++ ) { + crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; + } + + return (crc ^ (-1)); // >>> 0; +} + +// That's all for the pako functions. + +/** + * Compute the crc32 of a string. + * This is almost the same as the function crc32, but for strings. Using the + * same function for the two use cases leads to horrible performances. + * @param {Number} crc the starting value of the crc. + * @param {String} str the string to use. + * @param {Number} len the length of the string. + * @param {Number} pos the starting position for the crc32 computation. + * @return {Number} the computed crc32. + */ +function crc32str(crc, str, len, pos) { + var t = crcTable, end = pos + len; + + crc = crc ^ (-1); + + for (var i = pos; i < end; i++ ) { + crc = (crc >>> 8) ^ t[(crc ^ str.charCodeAt(i)) & 0xFF]; + } + + return (crc ^ (-1)); // >>> 0; +} + +module.exports = function crc32wrapper(input, crc) { + if (typeof input === "undefined" || !input.length) { + return 0; + } + + var isArray = utils.getTypeOf(input) !== "string"; + + if(isArray) { + return crc32(crc|0, input, input.length, 0); + } else { + return crc32str(crc|0, input, input.length, 0); + } +}; + +},{"./utils":32}],5:[function(require,module,exports){ +'use strict'; +exports.base64 = false; +exports.binary = false; +exports.dir = false; +exports.createFolders = true; +exports.date = null; +exports.compression = null; +exports.compressionOptions = null; +exports.comment = null; +exports.unixPermissions = null; +exports.dosPermissions = null; + +},{}],6:[function(require,module,exports){ +/* global Promise */ +'use strict'; + +// load the global object first: +// - it should be better integrated in the system (unhandledRejection in node) +// - the environment may have a custom Promise implementation (see zone.js) +var ES6Promise = null; +if (typeof Promise !== "undefined") { + ES6Promise = Promise; +} else { + ES6Promise = require("lie"); +} + +/** + * Let the user use/change some implementations. + */ +module.exports = { + Promise: ES6Promise +}; + +},{"lie":37}],7:[function(require,module,exports){ +'use strict'; +var USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined'); + +var pako = require("pako"); +var utils = require("./utils"); +var GenericWorker = require("./stream/GenericWorker"); + +var ARRAY_TYPE = USE_TYPEDARRAY ? "uint8array" : "array"; + +exports.magic = "\x08\x00"; + +/** + * Create a worker that uses pako to inflate/deflate. + * @constructor + * @param {String} action the name of the pako function to call : either "Deflate" or "Inflate". + * @param {Object} options the options to use when (de)compressing. + */ +function FlateWorker(action, options) { + GenericWorker.call(this, "FlateWorker/" + action); + + this._pako = null; + this._pakoAction = action; + this._pakoOptions = options; + // the `meta` object from the last chunk received + // this allow this worker to pass around metadata + this.meta = {}; +} + +utils.inherits(FlateWorker, GenericWorker); + +/** + * @see GenericWorker.processChunk + */ +FlateWorker.prototype.processChunk = function (chunk) { + this.meta = chunk.meta; + if (this._pako === null) { + this._createPako(); + } + this._pako.push(utils.transformTo(ARRAY_TYPE, chunk.data), false); +}; + +/** + * @see GenericWorker.flush + */ +FlateWorker.prototype.flush = function () { + GenericWorker.prototype.flush.call(this); + if (this._pako === null) { + this._createPako(); + } + this._pako.push([], true); +}; +/** + * @see GenericWorker.cleanUp + */ +FlateWorker.prototype.cleanUp = function () { + GenericWorker.prototype.cleanUp.call(this); + this._pako = null; +}; + +/** + * Create the _pako object. + * TODO: lazy-loading this object isn't the best solution but it's the + * quickest. The best solution is to lazy-load the worker list. See also the + * issue #446. + */ +FlateWorker.prototype._createPako = function () { + this._pako = new pako[this._pakoAction]({ + raw: true, + level: this._pakoOptions.level || -1 // default compression + }); + var self = this; + this._pako.onData = function(data) { + self.push({ + data : data, + meta : self.meta + }); + }; +}; + +exports.compressWorker = function (compressionOptions) { + return new FlateWorker("Deflate", compressionOptions); +}; +exports.uncompressWorker = function () { + return new FlateWorker("Inflate", {}); +}; + +},{"./stream/GenericWorker":28,"./utils":32,"pako":38}],8:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var GenericWorker = require('../stream/GenericWorker'); +var utf8 = require('../utf8'); +var crc32 = require('../crc32'); +var signature = require('../signature'); + +/** + * Transform an integer into a string in hexadecimal. + * @private + * @param {number} dec the number to convert. + * @param {number} bytes the number of bytes to generate. + * @returns {string} the result. + */ +var decToHex = function(dec, bytes) { + var hex = "", i; + for (i = 0; i < bytes; i++) { + hex += String.fromCharCode(dec & 0xff); + dec = dec >>> 8; + } + return hex; +}; + +/** + * Generate the UNIX part of the external file attributes. + * @param {Object} unixPermissions the unix permissions or null. + * @param {Boolean} isDir true if the entry is a directory, false otherwise. + * @return {Number} a 32 bit integer. + * + * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute : + * + * TTTTsstrwxrwxrwx0000000000ADVSHR + * ^^^^____________________________ file type, see zipinfo.c (UNX_*) + * ^^^_________________________ setuid, setgid, sticky + * ^^^^^^^^^________________ permissions + * ^^^^^^^^^^______ not used ? + * ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only + */ +var generateUnixExternalFileAttr = function (unixPermissions, isDir) { + + var result = unixPermissions; + if (!unixPermissions) { + // I can't use octal values in strict mode, hence the hexa. + // 040775 => 0x41fd + // 0100664 => 0x81b4 + result = isDir ? 0x41fd : 0x81b4; + } + return (result & 0xFFFF) << 16; +}; + +/** + * Generate the DOS part of the external file attributes. + * @param {Object} dosPermissions the dos permissions or null. + * @param {Boolean} isDir true if the entry is a directory, false otherwise. + * @return {Number} a 32 bit integer. + * + * Bit 0 Read-Only + * Bit 1 Hidden + * Bit 2 System + * Bit 3 Volume Label + * Bit 4 Directory + * Bit 5 Archive + */ +var generateDosExternalFileAttr = function (dosPermissions, isDir) { + + // the dir flag is already set for compatibility + return (dosPermissions || 0) & 0x3F; +}; + +/** + * Generate the various parts used in the construction of the final zip file. + * @param {Object} streamInfo the hash with information about the compressed file. + * @param {Boolean} streamedContent is the content streamed ? + * @param {Boolean} streamingEnded is the stream finished ? + * @param {number} offset the current offset from the start of the zip file. + * @param {String} platform let's pretend we are this platform (change platform dependents fields) + * @param {Function} encodeFileName the function to encode the file name / comment. + * @return {Object} the zip parts. + */ +var generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) { + var file = streamInfo['file'], + compression = streamInfo['compression'], + useCustomEncoding = encodeFileName !== utf8.utf8encode, + encodedFileName = utils.transformTo("string", encodeFileName(file.name)), + utfEncodedFileName = utils.transformTo("string", utf8.utf8encode(file.name)), + comment = file.comment, + encodedComment = utils.transformTo("string", encodeFileName(comment)), + utfEncodedComment = utils.transformTo("string", utf8.utf8encode(comment)), + useUTF8ForFileName = utfEncodedFileName.length !== file.name.length, + useUTF8ForComment = utfEncodedComment.length !== comment.length, + dosTime, + dosDate, + extraFields = "", + unicodePathExtraField = "", + unicodeCommentExtraField = "", + dir = file.dir, + date = file.date; + + + var dataInfo = { + crc32 : 0, + compressedSize : 0, + uncompressedSize : 0 + }; + + // if the content is streamed, the sizes/crc32 are only available AFTER + // the end of the stream. + if (!streamedContent || streamingEnded) { + dataInfo.crc32 = streamInfo['crc32']; + dataInfo.compressedSize = streamInfo['compressedSize']; + dataInfo.uncompressedSize = streamInfo['uncompressedSize']; + } + + var bitflag = 0; + if (streamedContent) { + // Bit 3: the sizes/crc32 are set to zero in the local header. + // The correct values are put in the data descriptor immediately + // following the compressed data. + bitflag |= 0x0008; + } + if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) { + // Bit 11: Language encoding flag (EFS). + bitflag |= 0x0800; + } + + + var extFileAttr = 0; + var versionMadeBy = 0; + if (dir) { + // dos or unix, we set the dos dir flag + extFileAttr |= 0x00010; + } + if(platform === "UNIX") { + versionMadeBy = 0x031E; // UNIX, version 3.0 + extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir); + } else { // DOS or other, fallback to DOS + versionMadeBy = 0x0014; // DOS, version 2.0 + extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir); + } + + // date + // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html + // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html + // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html + + dosTime = date.getUTCHours(); + dosTime = dosTime << 6; + dosTime = dosTime | date.getUTCMinutes(); + dosTime = dosTime << 5; + dosTime = dosTime | date.getUTCSeconds() / 2; + + dosDate = date.getUTCFullYear() - 1980; + dosDate = dosDate << 4; + dosDate = dosDate | (date.getUTCMonth() + 1); + dosDate = dosDate << 5; + dosDate = dosDate | date.getUTCDate(); + + if (useUTF8ForFileName) { + // set the unicode path extra field. unzip needs at least one extra + // field to correctly handle unicode path, so using the path is as good + // as any other information. This could improve the situation with + // other archive managers too. + // This field is usually used without the utf8 flag, with a non + // unicode path in the header (winrar, winzip). This helps (a bit) + // with the messy Windows' default compressed folders feature but + // breaks on p7zip which doesn't seek the unicode path extra field. + // So for now, UTF-8 everywhere ! + unicodePathExtraField = + // Version + decToHex(1, 1) + + // NameCRC32 + decToHex(crc32(encodedFileName), 4) + + // UnicodeName + utfEncodedFileName; + + extraFields += + // Info-ZIP Unicode Path Extra Field + "\x75\x70" + + // size + decToHex(unicodePathExtraField.length, 2) + + // content + unicodePathExtraField; + } + + if(useUTF8ForComment) { + + unicodeCommentExtraField = + // Version + decToHex(1, 1) + + // CommentCRC32 + decToHex(crc32(encodedComment), 4) + + // UnicodeName + utfEncodedComment; + + extraFields += + // Info-ZIP Unicode Path Extra Field + "\x75\x63" + + // size + decToHex(unicodeCommentExtraField.length, 2) + + // content + unicodeCommentExtraField; + } + + var header = ""; + + // version needed to extract + header += "\x0A\x00"; + // general purpose bit flag + header += decToHex(bitflag, 2); + // compression method + header += compression.magic; + // last mod file time + header += decToHex(dosTime, 2); + // last mod file date + header += decToHex(dosDate, 2); + // crc-32 + header += decToHex(dataInfo.crc32, 4); + // compressed size + header += decToHex(dataInfo.compressedSize, 4); + // uncompressed size + header += decToHex(dataInfo.uncompressedSize, 4); + // file name length + header += decToHex(encodedFileName.length, 2); + // extra field length + header += decToHex(extraFields.length, 2); + + + var fileRecord = signature.LOCAL_FILE_HEADER + header + encodedFileName + extraFields; + + var dirRecord = signature.CENTRAL_FILE_HEADER + + // version made by (00: DOS) + decToHex(versionMadeBy, 2) + + // file header (common to file and central directory) + header + + // file comment length + decToHex(encodedComment.length, 2) + + // disk number start + "\x00\x00" + + // internal file attributes TODO + "\x00\x00" + + // external file attributes + decToHex(extFileAttr, 4) + + // relative offset of local header + decToHex(offset, 4) + + // file name + encodedFileName + + // extra field + extraFields + + // file comment + encodedComment; + + return { + fileRecord: fileRecord, + dirRecord: dirRecord + }; +}; + +/** + * Generate the EOCD record. + * @param {Number} entriesCount the number of entries in the zip file. + * @param {Number} centralDirLength the length (in bytes) of the central dir. + * @param {Number} localDirLength the length (in bytes) of the local dir. + * @param {String} comment the zip file comment as a binary string. + * @param {Function} encodeFileName the function to encode the comment. + * @return {String} the EOCD record. + */ +var generateCentralDirectoryEnd = function (entriesCount, centralDirLength, localDirLength, comment, encodeFileName) { + var dirEnd = ""; + var encodedComment = utils.transformTo("string", encodeFileName(comment)); + + // end of central dir signature + dirEnd = signature.CENTRAL_DIRECTORY_END + + // number of this disk + "\x00\x00" + + // number of the disk with the start of the central directory + "\x00\x00" + + // total number of entries in the central directory on this disk + decToHex(entriesCount, 2) + + // total number of entries in the central directory + decToHex(entriesCount, 2) + + // size of the central directory 4 bytes + decToHex(centralDirLength, 4) + + // offset of start of central directory with respect to the starting disk number + decToHex(localDirLength, 4) + + // .ZIP file comment length + decToHex(encodedComment.length, 2) + + // .ZIP file comment + encodedComment; + + return dirEnd; +}; + +/** + * Generate data descriptors for a file entry. + * @param {Object} streamInfo the hash generated by a worker, containing information + * on the file entry. + * @return {String} the data descriptors. + */ +var generateDataDescriptors = function (streamInfo) { + var descriptor = ""; + descriptor = signature.DATA_DESCRIPTOR + + // crc-32 4 bytes + decToHex(streamInfo['crc32'], 4) + + // compressed size 4 bytes + decToHex(streamInfo['compressedSize'], 4) + + // uncompressed size 4 bytes + decToHex(streamInfo['uncompressedSize'], 4); + + return descriptor; +}; + + +/** + * A worker to concatenate other workers to create a zip file. + * @param {Boolean} streamFiles `true` to stream the content of the files, + * `false` to accumulate it. + * @param {String} comment the comment to use. + * @param {String} platform the platform to use, "UNIX" or "DOS". + * @param {Function} encodeFileName the function to encode file names and comments. + */ +function ZipFileWorker(streamFiles, comment, platform, encodeFileName) { + GenericWorker.call(this, "ZipFileWorker"); + // The number of bytes written so far. This doesn't count accumulated chunks. + this.bytesWritten = 0; + // The comment of the zip file + this.zipComment = comment; + // The platform "generating" the zip file. + this.zipPlatform = platform; + // the function to encode file names and comments. + this.encodeFileName = encodeFileName; + // Should we stream the content of the files ? + this.streamFiles = streamFiles; + // If `streamFiles` is false, we will need to accumulate the content of the + // files to calculate sizes / crc32 (and write them *before* the content). + // This boolean indicates if we are accumulating chunks (it will change a lot + // during the lifetime of this worker). + this.accumulate = false; + // The buffer receiving chunks when accumulating content. + this.contentBuffer = []; + // The list of generated directory records. + this.dirRecords = []; + // The offset (in bytes) from the beginning of the zip file for the current source. + this.currentSourceOffset = 0; + // The total number of entries in this zip file. + this.entriesCount = 0; + // the name of the file currently being added, null when handling the end of the zip file. + // Used for the emitted metadata. + this.currentFile = null; + + + + this._sources = []; +} +utils.inherits(ZipFileWorker, GenericWorker); + +/** + * @see GenericWorker.push + */ +ZipFileWorker.prototype.push = function (chunk) { + + var currentFilePercent = chunk.meta.percent || 0; + var entriesCount = this.entriesCount; + var remainingFiles = this._sources.length; + + if(this.accumulate) { + this.contentBuffer.push(chunk); + } else { + this.bytesWritten += chunk.data.length; + + GenericWorker.prototype.push.call(this, { + data : chunk.data, + meta : { + currentFile : this.currentFile, + percent : entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100 + } + }); + } +}; + +/** + * The worker started a new source (an other worker). + * @param {Object} streamInfo the streamInfo object from the new source. + */ +ZipFileWorker.prototype.openedSource = function (streamInfo) { + this.currentSourceOffset = this.bytesWritten; + this.currentFile = streamInfo['file'].name; + + var streamedContent = this.streamFiles && !streamInfo['file'].dir; + + // don't stream folders (because they don't have any content) + if(streamedContent) { + var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName); + this.push({ + data : record.fileRecord, + meta : {percent:0} + }); + } else { + // we need to wait for the whole file before pushing anything + this.accumulate = true; + } +}; + +/** + * The worker finished a source (an other worker). + * @param {Object} streamInfo the streamInfo object from the finished source. + */ +ZipFileWorker.prototype.closedSource = function (streamInfo) { + this.accumulate = false; + var streamedContent = this.streamFiles && !streamInfo['file'].dir; + var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName); + + this.dirRecords.push(record.dirRecord); + if(streamedContent) { + // after the streamed file, we put data descriptors + this.push({ + data : generateDataDescriptors(streamInfo), + meta : {percent:100} + }); + } else { + // the content wasn't streamed, we need to push everything now + // first the file record, then the content + this.push({ + data : record.fileRecord, + meta : {percent:0} + }); + while(this.contentBuffer.length) { + this.push(this.contentBuffer.shift()); + } + } + this.currentFile = null; +}; + +/** + * @see GenericWorker.flush + */ +ZipFileWorker.prototype.flush = function () { + + var localDirLength = this.bytesWritten; + for(var i = 0; i < this.dirRecords.length; i++) { + this.push({ + data : this.dirRecords[i], + meta : {percent:100} + }); + } + var centralDirLength = this.bytesWritten - localDirLength; + + var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName); + + this.push({ + data : dirEnd, + meta : {percent:100} + }); +}; + +/** + * Prepare the next source to be read. + */ +ZipFileWorker.prototype.prepareNextSource = function () { + this.previous = this._sources.shift(); + this.openedSource(this.previous.streamInfo); + if (this.isPaused) { + this.previous.pause(); + } else { + this.previous.resume(); + } +}; + +/** + * @see GenericWorker.registerPrevious + */ +ZipFileWorker.prototype.registerPrevious = function (previous) { + this._sources.push(previous); + var self = this; + + previous.on('data', function (chunk) { + self.processChunk(chunk); + }); + previous.on('end', function () { + self.closedSource(self.previous.streamInfo); + if(self._sources.length) { + self.prepareNextSource(); + } else { + self.end(); + } + }); + previous.on('error', function (e) { + self.error(e); + }); + return this; +}; + +/** + * @see GenericWorker.resume + */ +ZipFileWorker.prototype.resume = function () { + if(!GenericWorker.prototype.resume.call(this)) { + return false; + } + + if (!this.previous && this._sources.length) { + this.prepareNextSource(); + return true; + } + if (!this.previous && !this._sources.length && !this.generatedError) { + this.end(); + return true; + } +}; + +/** + * @see GenericWorker.error + */ +ZipFileWorker.prototype.error = function (e) { + var sources = this._sources; + if(!GenericWorker.prototype.error.call(this, e)) { + return false; + } + for(var i = 0; i < sources.length; i++) { + try { + sources[i].error(e); + } catch(e) { + // the `error` exploded, nothing to do + } + } + return true; +}; + +/** + * @see GenericWorker.lock + */ +ZipFileWorker.prototype.lock = function () { + GenericWorker.prototype.lock.call(this); + var sources = this._sources; + for(var i = 0; i < sources.length; i++) { + sources[i].lock(); + } +}; + +module.exports = ZipFileWorker; + +},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(require,module,exports){ +'use strict'; + +var compressions = require('../compressions'); +var ZipFileWorker = require('./ZipFileWorker'); + +/** + * Find the compression to use. + * @param {String} fileCompression the compression defined at the file level, if any. + * @param {String} zipCompression the compression defined at the load() level. + * @return {Object} the compression object to use. + */ +var getCompression = function (fileCompression, zipCompression) { + + var compressionName = fileCompression || zipCompression; + var compression = compressions[compressionName]; + if (!compression) { + throw new Error(compressionName + " is not a valid compression method !"); + } + return compression; +}; + +/** + * Create a worker to generate a zip file. + * @param {JSZip} zip the JSZip instance at the right root level. + * @param {Object} options to generate the zip file. + * @param {String} comment the comment to use. + */ +exports.generateWorker = function (zip, options, comment) { + + var zipFileWorker = new ZipFileWorker(options.streamFiles, comment, options.platform, options.encodeFileName); + var entriesCount = 0; + try { + + zip.forEach(function (relativePath, file) { + entriesCount++; + var compression = getCompression(file.options.compression, options.compression); + var compressionOptions = file.options.compressionOptions || options.compressionOptions || {}; + var dir = file.dir, date = file.date; + + file._compressWorker(compression, compressionOptions) + .withStreamInfo("file", { + name : relativePath, + dir : dir, + date : date, + comment : file.comment || "", + unixPermissions : file.unixPermissions, + dosPermissions : file.dosPermissions + }) + .pipe(zipFileWorker); + }); + zipFileWorker.entriesCount = entriesCount; + } catch (e) { + zipFileWorker.error(e); + } + + return zipFileWorker; +}; + +},{"../compressions":3,"./ZipFileWorker":8}],10:[function(require,module,exports){ +'use strict'; + +/** + * Representation a of zip file in js + * @constructor + */ +function JSZip() { + // if this constructor is used without `new`, it adds `new` before itself: + if(!(this instanceof JSZip)) { + return new JSZip(); + } + + if(arguments.length) { + throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide."); + } + + // object containing the files : + // { + // "folder/" : {...}, + // "folder/data.txt" : {...} + // } + // NOTE: we use a null prototype because we do not + // want filenames like "toString" coming from a zip file + // to overwrite methods and attributes in a normal Object. + this.files = Object.create(null); + + this.comment = null; + + // Where we are in the hierarchy + this.root = ""; + this.clone = function() { + var newObj = new JSZip(); + for (var i in this) { + if (typeof this[i] !== "function") { + newObj[i] = this[i]; + } + } + return newObj; + }; +} +JSZip.prototype = require('./object'); +JSZip.prototype.loadAsync = require('./load'); +JSZip.support = require('./support'); +JSZip.defaults = require('./defaults'); + +// TODO find a better way to handle this version, +// a require('package.json').version doesn't work with webpack, see #327 +JSZip.version = "3.7.1"; + +JSZip.loadAsync = function (content, options) { + return new JSZip().loadAsync(content, options); +}; + +JSZip.external = require("./external"); +module.exports = JSZip; + +},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(require,module,exports){ +'use strict'; +var utils = require('./utils'); +var external = require("./external"); +var utf8 = require('./utf8'); +var ZipEntries = require('./zipEntries'); +var Crc32Probe = require('./stream/Crc32Probe'); +var nodejsUtils = require("./nodejsUtils"); + +/** + * Check the CRC32 of an entry. + * @param {ZipEntry} zipEntry the zip entry to check. + * @return {Promise} the result. + */ +function checkEntryCRC32(zipEntry) { + return new external.Promise(function (resolve, reject) { + var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe()); + worker.on("error", function (e) { + reject(e); + }) + .on("end", function () { + if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) { + reject(new Error("Corrupted zip : CRC32 mismatch")); + } else { + resolve(); + } + }) + .resume(); + }); +} + +module.exports = function (data, options) { + var zip = this; + options = utils.extend(options || {}, { + base64: false, + checkCRC32: false, + optimizedBinaryString: false, + createFolders: false, + decodeFileName: utf8.utf8decode + }); + + if (nodejsUtils.isNode && nodejsUtils.isStream(data)) { + return external.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")); + } + + return utils.prepareContent("the loaded zip file", data, true, options.optimizedBinaryString, options.base64) + .then(function (data) { + var zipEntries = new ZipEntries(options); + zipEntries.load(data); + return zipEntries; + }).then(function checkCRC32(zipEntries) { + var promises = [external.Promise.resolve(zipEntries)]; + var files = zipEntries.files; + if (options.checkCRC32) { + for (var i = 0; i < files.length; i++) { + promises.push(checkEntryCRC32(files[i])); + } + } + return external.Promise.all(promises); + }).then(function addFiles(results) { + var zipEntries = results.shift(); + var files = zipEntries.files; + for (var i = 0; i < files.length; i++) { + var input = files[i]; + zip.file(input.fileNameStr, input.decompressed, { + binary: true, + optimizedBinaryString: true, + date: input.date, + dir: input.dir, + comment: input.fileCommentStr.length ? input.fileCommentStr : null, + unixPermissions: input.unixPermissions, + dosPermissions: input.dosPermissions, + createFolders: options.createFolders + }); + } + if (zipEntries.zipComment.length) { + zip.comment = zipEntries.zipComment; + } + + return zip; + }); +}; + +},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(require,module,exports){ +"use strict"; + +var utils = require('../utils'); +var GenericWorker = require('../stream/GenericWorker'); + +/** + * A worker that use a nodejs stream as source. + * @constructor + * @param {String} filename the name of the file entry for this stream. + * @param {Readable} stream the nodejs stream. + */ +function NodejsStreamInputAdapter(filename, stream) { + GenericWorker.call(this, "Nodejs stream input adapter for " + filename); + this._upstreamEnded = false; + this._bindStream(stream); +} + +utils.inherits(NodejsStreamInputAdapter, GenericWorker); + +/** + * Prepare the stream and bind the callbacks on it. + * Do this ASAP on node 0.10 ! A lazy binding doesn't always work. + * @param {Stream} stream the nodejs stream to use. + */ +NodejsStreamInputAdapter.prototype._bindStream = function (stream) { + var self = this; + this._stream = stream; + stream.pause(); + stream + .on("data", function (chunk) { + self.push({ + data: chunk, + meta : { + percent : 0 + } + }); + }) + .on("error", function (e) { + if(self.isPaused) { + this.generatedError = e; + } else { + self.error(e); + } + }) + .on("end", function () { + if(self.isPaused) { + self._upstreamEnded = true; + } else { + self.end(); + } + }); +}; +NodejsStreamInputAdapter.prototype.pause = function () { + if(!GenericWorker.prototype.pause.call(this)) { + return false; + } + this._stream.pause(); + return true; +}; +NodejsStreamInputAdapter.prototype.resume = function () { + if(!GenericWorker.prototype.resume.call(this)) { + return false; + } + + if(this._upstreamEnded) { + this.end(); + } else { + this._stream.resume(); + } + + return true; +}; + +module.exports = NodejsStreamInputAdapter; + +},{"../stream/GenericWorker":28,"../utils":32}],13:[function(require,module,exports){ +'use strict'; + +var Readable = require('readable-stream').Readable; + +var utils = require('../utils'); +utils.inherits(NodejsStreamOutputAdapter, Readable); + +/** +* A nodejs stream using a worker as source. +* @see the SourceWrapper in http://nodejs.org/api/stream.html +* @constructor +* @param {StreamHelper} helper the helper wrapping the worker +* @param {Object} options the nodejs stream options +* @param {Function} updateCb the update callback. +*/ +function NodejsStreamOutputAdapter(helper, options, updateCb) { + Readable.call(this, options); + this._helper = helper; + + var self = this; + helper.on("data", function (data, meta) { + if (!self.push(data)) { + self._helper.pause(); + } + if(updateCb) { + updateCb(meta); + } + }) + .on("error", function(e) { + self.emit('error', e); + }) + .on("end", function () { + self.push(null); + }); +} + + +NodejsStreamOutputAdapter.prototype._read = function() { + this._helper.resume(); +}; + +module.exports = NodejsStreamOutputAdapter; + +},{"../utils":32,"readable-stream":16}],14:[function(require,module,exports){ +'use strict'; + +module.exports = { + /** + * True if this is running in Nodejs, will be undefined in a browser. + * In a browser, browserify won't include this file and the whole module + * will be resolved an empty object. + */ + isNode : typeof Buffer !== "undefined", + /** + * Create a new nodejs Buffer from an existing content. + * @param {Object} data the data to pass to the constructor. + * @param {String} encoding the encoding to use. + * @return {Buffer} a new Buffer. + */ + newBufferFrom: function(data, encoding) { + if (Buffer.from && Buffer.from !== Uint8Array.from) { + return Buffer.from(data, encoding); + } else { + if (typeof data === "number") { + // Safeguard for old Node.js versions. On newer versions, + // Buffer.from(number) / Buffer(number, encoding) already throw. + throw new Error("The \"data\" argument must not be a number"); + } + return new Buffer(data, encoding); + } + }, + /** + * Create a new nodejs Buffer with the specified size. + * @param {Integer} size the size of the buffer. + * @return {Buffer} a new Buffer. + */ + allocBuffer: function (size) { + if (Buffer.alloc) { + return Buffer.alloc(size); + } else { + var buf = new Buffer(size); + buf.fill(0); + return buf; + } + }, + /** + * Find out if an object is a Buffer. + * @param {Object} b the object to test. + * @return {Boolean} true if the object is a Buffer, false otherwise. + */ + isBuffer : function(b){ + return Buffer.isBuffer(b); + }, + + isStream : function (obj) { + return obj && + typeof obj.on === "function" && + typeof obj.pause === "function" && + typeof obj.resume === "function"; + } +}; + +},{}],15:[function(require,module,exports){ +'use strict'; +var utf8 = require('./utf8'); +var utils = require('./utils'); +var GenericWorker = require('./stream/GenericWorker'); +var StreamHelper = require('./stream/StreamHelper'); +var defaults = require('./defaults'); +var CompressedObject = require('./compressedObject'); +var ZipObject = require('./zipObject'); +var generate = require("./generate"); +var nodejsUtils = require("./nodejsUtils"); +var NodejsStreamInputAdapter = require("./nodejs/NodejsStreamInputAdapter"); + + +/** + * Add a file in the current folder. + * @private + * @param {string} name the name of the file + * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file + * @param {Object} originalOptions the options of the file + * @return {Object} the new file. + */ +var fileAdd = function(name, data, originalOptions) { + // be sure sub folders exist + var dataType = utils.getTypeOf(data), + parent; + + + /* + * Correct options. + */ + + var o = utils.extend(originalOptions || {}, defaults); + o.date = o.date || new Date(); + if (o.compression !== null) { + o.compression = o.compression.toUpperCase(); + } + + if (typeof o.unixPermissions === "string") { + o.unixPermissions = parseInt(o.unixPermissions, 8); + } + + // UNX_IFDIR 0040000 see zipinfo.c + if (o.unixPermissions && (o.unixPermissions & 0x4000)) { + o.dir = true; + } + // Bit 4 Directory + if (o.dosPermissions && (o.dosPermissions & 0x0010)) { + o.dir = true; + } + + if (o.dir) { + name = forceTrailingSlash(name); + } + if (o.createFolders && (parent = parentFolder(name))) { + folderAdd.call(this, parent, true); + } + + var isUnicodeString = dataType === "string" && o.binary === false && o.base64 === false; + if (!originalOptions || typeof originalOptions.binary === "undefined") { + o.binary = !isUnicodeString; + } + + + var isCompressedEmpty = (data instanceof CompressedObject) && data.uncompressedSize === 0; + + if (isCompressedEmpty || o.dir || !data || data.length === 0) { + o.base64 = false; + o.binary = true; + data = ""; + o.compression = "STORE"; + dataType = "string"; + } + + /* + * Convert content to fit. + */ + + var zipObjectContent = null; + if (data instanceof CompressedObject || data instanceof GenericWorker) { + zipObjectContent = data; + } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) { + zipObjectContent = new NodejsStreamInputAdapter(name, data); + } else { + zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64); + } + + var object = new ZipObject(name, zipObjectContent, o); + this.files[name] = object; + /* + TODO: we can't throw an exception because we have async promises + (we can have a promise of a Date() for example) but returning a + promise is useless because file(name, data) returns the JSZip + object for chaining. Should we break that to allow the user + to catch the error ? + + return external.Promise.resolve(zipObjectContent) + .then(function () { + return object; + }); + */ +}; + +/** + * Find the parent folder of the path. + * @private + * @param {string} path the path to use + * @return {string} the parent folder, or "" + */ +var parentFolder = function (path) { + if (path.slice(-1) === '/') { + path = path.substring(0, path.length - 1); + } + var lastSlash = path.lastIndexOf('/'); + return (lastSlash > 0) ? path.substring(0, lastSlash) : ""; +}; + +/** + * Returns the path with a slash at the end. + * @private + * @param {String} path the path to check. + * @return {String} the path with a trailing slash. + */ +var forceTrailingSlash = function(path) { + // Check the name ends with a / + if (path.slice(-1) !== "/") { + path += "/"; // IE doesn't like substr(-1) + } + return path; +}; + +/** + * Add a (sub) folder in the current folder. + * @private + * @param {string} name the folder's name + * @param {boolean=} [createFolders] If true, automatically create sub + * folders. Defaults to false. + * @return {Object} the new folder. + */ +var folderAdd = function(name, createFolders) { + createFolders = (typeof createFolders !== 'undefined') ? createFolders : defaults.createFolders; + + name = forceTrailingSlash(name); + + // Does this folder already exist? + if (!this.files[name]) { + fileAdd.call(this, name, null, { + dir: true, + createFolders: createFolders + }); + } + return this.files[name]; +}; + +/** +* Cross-window, cross-Node-context regular expression detection +* @param {Object} object Anything +* @return {Boolean} true if the object is a regular expression, +* false otherwise +*/ +function isRegExp(object) { + return Object.prototype.toString.call(object) === "[object RegExp]"; +} + +// return the actual prototype of JSZip +var out = { + /** + * @see loadAsync + */ + load: function() { + throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); + }, + + + /** + * Call a callback function for each entry at this folder level. + * @param {Function} cb the callback function: + * function (relativePath, file) {...} + * It takes 2 arguments : the relative path and the file. + */ + forEach: function(cb) { + var filename, relativePath, file; + /* jshint ignore:start */ + // ignore warning about unwanted properties because this.files is a null prototype object + for (filename in this.files) { + file = this.files[filename]; + relativePath = filename.slice(this.root.length, filename.length); + if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root + cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn... + } + } + /* jshint ignore:end */ + }, + + /** + * Filter nested files/folders with the specified function. + * @param {Function} search the predicate to use : + * function (relativePath, file) {...} + * It takes 2 arguments : the relative path and the file. + * @return {Array} An array of matching elements. + */ + filter: function(search) { + var result = []; + this.forEach(function (relativePath, entry) { + if (search(relativePath, entry)) { // the file matches the function + result.push(entry); + } + + }); + return result; + }, + + /** + * Add a file to the zip file, or search a file. + * @param {string|RegExp} name The name of the file to add (if data is defined), + * the name of the file to find (if no data) or a regex to match files. + * @param {String|ArrayBuffer|Uint8Array|Buffer} data The file data, either raw or base64 encoded + * @param {Object} o File options + * @return {JSZip|Object|Array} this JSZip object (when adding a file), + * a file (when searching by string) or an array of files (when searching by regex). + */ + file: function(name, data, o) { + if (arguments.length === 1) { + if (isRegExp(name)) { + var regexp = name; + return this.filter(function(relativePath, file) { + return !file.dir && regexp.test(relativePath); + }); + } + else { // text + var obj = this.files[this.root + name]; + if (obj && !obj.dir) { + return obj; + } else { + return null; + } + } + } + else { // more than one argument : we have data ! + name = this.root + name; + fileAdd.call(this, name, data, o); + } + return this; + }, + + /** + * Add a directory to the zip file, or search. + * @param {String|RegExp} arg The name of the directory to add, or a regex to search folders. + * @return {JSZip} an object with the new directory as the root, or an array containing matching folders. + */ + folder: function(arg) { + if (!arg) { + return this; + } + + if (isRegExp(arg)) { + return this.filter(function(relativePath, file) { + return file.dir && arg.test(relativePath); + }); + } + + // else, name is a new folder + var name = this.root + arg; + var newFolder = folderAdd.call(this, name); + + // Allow chaining by returning a new object with this folder as the root + var ret = this.clone(); + ret.root = newFolder.name; + return ret; + }, + + /** + * Delete a file, or a directory and all sub-files, from the zip + * @param {string} name the name of the file to delete + * @return {JSZip} this JSZip object + */ + remove: function(name) { + name = this.root + name; + var file = this.files[name]; + if (!file) { + // Look for any folders + if (name.slice(-1) !== "/") { + name += "/"; + } + file = this.files[name]; + } + + if (file && !file.dir) { + // file + delete this.files[name]; + } else { + // maybe a folder, delete recursively + var kids = this.filter(function(relativePath, file) { + return file.name.slice(0, name.length) === name; + }); + for (var i = 0; i < kids.length; i++) { + delete this.files[kids[i].name]; + } + } + + return this; + }, + + /** + * Generate the complete zip file + * @param {Object} options the options to generate the zip file : + * - compression, "STORE" by default. + * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob. + * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file + */ + generate: function(options) { + throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); + }, + + /** + * Generate the complete zip file as an internal stream. + * @param {Object} options the options to generate the zip file : + * - compression, "STORE" by default. + * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob. + * @return {StreamHelper} the streamed zip file. + */ + generateInternalStream: function(options) { + var worker, opts = {}; + try { + opts = utils.extend(options || {}, { + streamFiles: false, + compression: "STORE", + compressionOptions : null, + type: "", + platform: "DOS", + comment: null, + mimeType: 'application/zip', + encodeFileName: utf8.utf8encode + }); + + opts.type = opts.type.toLowerCase(); + opts.compression = opts.compression.toUpperCase(); + + // "binarystring" is preferred but the internals use "string". + if(opts.type === "binarystring") { + opts.type = "string"; + } + + if (!opts.type) { + throw new Error("No output type specified."); + } + + utils.checkSupport(opts.type); + + // accept nodejs `process.platform` + if( + opts.platform === 'darwin' || + opts.platform === 'freebsd' || + opts.platform === 'linux' || + opts.platform === 'sunos' + ) { + opts.platform = "UNIX"; + } + if (opts.platform === 'win32') { + opts.platform = "DOS"; + } + + var comment = opts.comment || this.comment || ""; + worker = generate.generateWorker(this, opts, comment); + } catch (e) { + worker = new GenericWorker("error"); + worker.error(e); + } + return new StreamHelper(worker, opts.type || "string", opts.mimeType); + }, + /** + * Generate the complete zip file asynchronously. + * @see generateInternalStream + */ + generateAsync: function(options, onUpdate) { + return this.generateInternalStream(options).accumulate(onUpdate); + }, + /** + * Generate the complete zip file asynchronously. + * @see generateInternalStream + */ + generateNodeStream: function(options, onUpdate) { + options = options || {}; + if (!options.type) { + options.type = "nodebuffer"; + } + return this.generateInternalStream(options).toNodejsStream(onUpdate); + } +}; +module.exports = out; + +},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(require,module,exports){ +/* + * This file is used by module bundlers (browserify/webpack/etc) when + * including a stream implementation. We use "readable-stream" to get a + * consistent behavior between nodejs versions but bundlers often have a shim + * for "stream". Using this shim greatly improve the compatibility and greatly + * reduce the final size of the bundle (only one stream implementation, not + * two). + */ +module.exports = require("stream"); + +},{"stream":undefined}],17:[function(require,module,exports){ +'use strict'; +var DataReader = require('./DataReader'); +var utils = require('../utils'); + +function ArrayReader(data) { + DataReader.call(this, data); + for(var i = 0; i < this.data.length; i++) { + data[i] = data[i] & 0xFF; + } +} +utils.inherits(ArrayReader, DataReader); +/** + * @see DataReader.byteAt + */ +ArrayReader.prototype.byteAt = function(i) { + return this.data[this.zero + i]; +}; +/** + * @see DataReader.lastIndexOfSignature + */ +ArrayReader.prototype.lastIndexOfSignature = function(sig) { + var sig0 = sig.charCodeAt(0), + sig1 = sig.charCodeAt(1), + sig2 = sig.charCodeAt(2), + sig3 = sig.charCodeAt(3); + for (var i = this.length - 4; i >= 0; --i) { + if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) { + return i - this.zero; + } + } + + return -1; +}; +/** + * @see DataReader.readAndCheckSignature + */ +ArrayReader.prototype.readAndCheckSignature = function (sig) { + var sig0 = sig.charCodeAt(0), + sig1 = sig.charCodeAt(1), + sig2 = sig.charCodeAt(2), + sig3 = sig.charCodeAt(3), + data = this.readData(4); + return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3]; +}; +/** + * @see DataReader.readData + */ +ArrayReader.prototype.readData = function(size) { + this.checkOffset(size); + if(size === 0) { + return []; + } + var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; +}; +module.exports = ArrayReader; + +},{"../utils":32,"./DataReader":18}],18:[function(require,module,exports){ +'use strict'; +var utils = require('../utils'); + +function DataReader(data) { + this.data = data; // type : see implementation + this.length = data.length; + this.index = 0; + this.zero = 0; +} +DataReader.prototype = { + /** + * Check that the offset will not go too far. + * @param {string} offset the additional offset to check. + * @throws {Error} an Error if the offset is out of bounds. + */ + checkOffset: function(offset) { + this.checkIndex(this.index + offset); + }, + /** + * Check that the specified index will not be too far. + * @param {string} newIndex the index to check. + * @throws {Error} an Error if the index is out of bounds. + */ + checkIndex: function(newIndex) { + if (this.length < this.zero + newIndex || newIndex < 0) { + throw new Error("End of data reached (data length = " + this.length + ", asked index = " + (newIndex) + "). Corrupted zip ?"); + } + }, + /** + * Change the index. + * @param {number} newIndex The new index. + * @throws {Error} if the new index is out of the data. + */ + setIndex: function(newIndex) { + this.checkIndex(newIndex); + this.index = newIndex; + }, + /** + * Skip the next n bytes. + * @param {number} n the number of bytes to skip. + * @throws {Error} if the new index is out of the data. + */ + skip: function(n) { + this.setIndex(this.index + n); + }, + /** + * Get the byte at the specified index. + * @param {number} i the index to use. + * @return {number} a byte. + */ + byteAt: function(i) { + // see implementations + }, + /** + * Get the next number with a given byte size. + * @param {number} size the number of bytes to read. + * @return {number} the corresponding number. + */ + readInt: function(size) { + var result = 0, + i; + this.checkOffset(size); + for (i = this.index + size - 1; i >= this.index; i--) { + result = (result << 8) + this.byteAt(i); + } + this.index += size; + return result; + }, + /** + * Get the next string with a given byte size. + * @param {number} size the number of bytes to read. + * @return {string} the corresponding string. + */ + readString: function(size) { + return utils.transformTo("string", this.readData(size)); + }, + /** + * Get raw data without conversion, bytes. + * @param {number} size the number of bytes to read. + * @return {Object} the raw data, implementation specific. + */ + readData: function(size) { + // see implementations + }, + /** + * Find the last occurrence of a zip signature (4 bytes). + * @param {string} sig the signature to find. + * @return {number} the index of the last occurrence, -1 if not found. + */ + lastIndexOfSignature: function(sig) { + // see implementations + }, + /** + * Read the signature (4 bytes) at the current position and compare it with sig. + * @param {string} sig the expected signature + * @return {boolean} true if the signature matches, false otherwise. + */ + readAndCheckSignature: function(sig) { + // see implementations + }, + /** + * Get the next date. + * @return {Date} the date. + */ + readDate: function() { + var dostime = this.readInt(4); + return new Date(Date.UTC( + ((dostime >> 25) & 0x7f) + 1980, // year + ((dostime >> 21) & 0x0f) - 1, // month + (dostime >> 16) & 0x1f, // day + (dostime >> 11) & 0x1f, // hour + (dostime >> 5) & 0x3f, // minute + (dostime & 0x1f) << 1)); // second + } +}; +module.exports = DataReader; + +},{"../utils":32}],19:[function(require,module,exports){ +'use strict'; +var Uint8ArrayReader = require('./Uint8ArrayReader'); +var utils = require('../utils'); + +function NodeBufferReader(data) { + Uint8ArrayReader.call(this, data); +} +utils.inherits(NodeBufferReader, Uint8ArrayReader); + +/** + * @see DataReader.readData + */ +NodeBufferReader.prototype.readData = function(size) { + this.checkOffset(size); + var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; +}; +module.exports = NodeBufferReader; + +},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(require,module,exports){ +'use strict'; +var DataReader = require('./DataReader'); +var utils = require('../utils'); + +function StringReader(data) { + DataReader.call(this, data); +} +utils.inherits(StringReader, DataReader); +/** + * @see DataReader.byteAt + */ +StringReader.prototype.byteAt = function(i) { + return this.data.charCodeAt(this.zero + i); +}; +/** + * @see DataReader.lastIndexOfSignature + */ +StringReader.prototype.lastIndexOfSignature = function(sig) { + return this.data.lastIndexOf(sig) - this.zero; +}; +/** + * @see DataReader.readAndCheckSignature + */ +StringReader.prototype.readAndCheckSignature = function (sig) { + var data = this.readData(4); + return sig === data; +}; +/** + * @see DataReader.readData + */ +StringReader.prototype.readData = function(size) { + this.checkOffset(size); + // this will work because the constructor applied the "& 0xff" mask. + var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; +}; +module.exports = StringReader; + +},{"../utils":32,"./DataReader":18}],21:[function(require,module,exports){ +'use strict'; +var ArrayReader = require('./ArrayReader'); +var utils = require('../utils'); + +function Uint8ArrayReader(data) { + ArrayReader.call(this, data); +} +utils.inherits(Uint8ArrayReader, ArrayReader); +/** + * @see DataReader.readData + */ +Uint8ArrayReader.prototype.readData = function(size) { + this.checkOffset(size); + if(size === 0) { + // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of []. + return new Uint8Array(0); + } + var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; +}; +module.exports = Uint8ArrayReader; + +},{"../utils":32,"./ArrayReader":17}],22:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var support = require('../support'); +var ArrayReader = require('./ArrayReader'); +var StringReader = require('./StringReader'); +var NodeBufferReader = require('./NodeBufferReader'); +var Uint8ArrayReader = require('./Uint8ArrayReader'); + +/** + * Create a reader adapted to the data. + * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data to read. + * @return {DataReader} the data reader. + */ +module.exports = function (data) { + var type = utils.getTypeOf(data); + utils.checkSupport(type); + if (type === "string" && !support.uint8array) { + return new StringReader(data); + } + if (type === "nodebuffer") { + return new NodeBufferReader(data); + } + if (support.uint8array) { + return new Uint8ArrayReader(utils.transformTo("uint8array", data)); + } + return new ArrayReader(utils.transformTo("array", data)); +}; + +},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(require,module,exports){ +'use strict'; +exports.LOCAL_FILE_HEADER = "PK\x03\x04"; +exports.CENTRAL_FILE_HEADER = "PK\x01\x02"; +exports.CENTRAL_DIRECTORY_END = "PK\x05\x06"; +exports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x06\x07"; +exports.ZIP64_CENTRAL_DIRECTORY_END = "PK\x06\x06"; +exports.DATA_DESCRIPTOR = "PK\x07\x08"; + +},{}],24:[function(require,module,exports){ +'use strict'; + +var GenericWorker = require('./GenericWorker'); +var utils = require('../utils'); + +/** + * A worker which convert chunks to a specified type. + * @constructor + * @param {String} destType the destination type. + */ +function ConvertWorker(destType) { + GenericWorker.call(this, "ConvertWorker to " + destType); + this.destType = destType; +} +utils.inherits(ConvertWorker, GenericWorker); + +/** + * @see GenericWorker.processChunk + */ +ConvertWorker.prototype.processChunk = function (chunk) { + this.push({ + data : utils.transformTo(this.destType, chunk.data), + meta : chunk.meta + }); +}; +module.exports = ConvertWorker; + +},{"../utils":32,"./GenericWorker":28}],25:[function(require,module,exports){ +'use strict'; + +var GenericWorker = require('./GenericWorker'); +var crc32 = require('../crc32'); +var utils = require('../utils'); + +/** + * A worker which calculate the crc32 of the data flowing through. + * @constructor + */ +function Crc32Probe() { + GenericWorker.call(this, "Crc32Probe"); + this.withStreamInfo("crc32", 0); +} +utils.inherits(Crc32Probe, GenericWorker); + +/** + * @see GenericWorker.processChunk + */ +Crc32Probe.prototype.processChunk = function (chunk) { + this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0); + this.push(chunk); +}; +module.exports = Crc32Probe; + +},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var GenericWorker = require('./GenericWorker'); + +/** + * A worker which calculate the total length of the data flowing through. + * @constructor + * @param {String} propName the name used to expose the length + */ +function DataLengthProbe(propName) { + GenericWorker.call(this, "DataLengthProbe for " + propName); + this.propName = propName; + this.withStreamInfo(propName, 0); +} +utils.inherits(DataLengthProbe, GenericWorker); + +/** + * @see GenericWorker.processChunk + */ +DataLengthProbe.prototype.processChunk = function (chunk) { + if(chunk) { + var length = this.streamInfo[this.propName] || 0; + this.streamInfo[this.propName] = length + chunk.data.length; + } + GenericWorker.prototype.processChunk.call(this, chunk); +}; +module.exports = DataLengthProbe; + + +},{"../utils":32,"./GenericWorker":28}],27:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var GenericWorker = require('./GenericWorker'); + +// the size of the generated chunks +// TODO expose this as a public variable +var DEFAULT_BLOCK_SIZE = 16 * 1024; + +/** + * A worker that reads a content and emits chunks. + * @constructor + * @param {Promise} dataP the promise of the data to split + */ +function DataWorker(dataP) { + GenericWorker.call(this, "DataWorker"); + var self = this; + this.dataIsReady = false; + this.index = 0; + this.max = 0; + this.data = null; + this.type = ""; + + this._tickScheduled = false; + + dataP.then(function (data) { + self.dataIsReady = true; + self.data = data; + self.max = data && data.length || 0; + self.type = utils.getTypeOf(data); + if(!self.isPaused) { + self._tickAndRepeat(); + } + }, function (e) { + self.error(e); + }); +} + +utils.inherits(DataWorker, GenericWorker); + +/** + * @see GenericWorker.cleanUp + */ +DataWorker.prototype.cleanUp = function () { + GenericWorker.prototype.cleanUp.call(this); + this.data = null; +}; + +/** + * @see GenericWorker.resume + */ +DataWorker.prototype.resume = function () { + if(!GenericWorker.prototype.resume.call(this)) { + return false; + } + + if (!this._tickScheduled && this.dataIsReady) { + this._tickScheduled = true; + utils.delay(this._tickAndRepeat, [], this); + } + return true; +}; + +/** + * Trigger a tick a schedule an other call to this function. + */ +DataWorker.prototype._tickAndRepeat = function() { + this._tickScheduled = false; + if(this.isPaused || this.isFinished) { + return; + } + this._tick(); + if(!this.isFinished) { + utils.delay(this._tickAndRepeat, [], this); + this._tickScheduled = true; + } +}; + +/** + * Read and push a chunk. + */ +DataWorker.prototype._tick = function() { + + if(this.isPaused || this.isFinished) { + return false; + } + + var size = DEFAULT_BLOCK_SIZE; + var data = null, nextIndex = Math.min(this.max, this.index + size); + if (this.index >= this.max) { + // EOF + return this.end(); + } else { + switch(this.type) { + case "string": + data = this.data.substring(this.index, nextIndex); + break; + case "uint8array": + data = this.data.subarray(this.index, nextIndex); + break; + case "array": + case "nodebuffer": + data = this.data.slice(this.index, nextIndex); + break; + } + this.index = nextIndex; + return this.push({ + data : data, + meta : { + percent : this.max ? this.index / this.max * 100 : 0 + } + }); + } +}; + +module.exports = DataWorker; + +},{"../utils":32,"./GenericWorker":28}],28:[function(require,module,exports){ +'use strict'; + +/** + * A worker that does nothing but passing chunks to the next one. This is like + * a nodejs stream but with some differences. On the good side : + * - it works on IE 6-9 without any issue / polyfill + * - it weights less than the full dependencies bundled with browserify + * - it forwards errors (no need to declare an error handler EVERYWHERE) + * + * A chunk is an object with 2 attributes : `meta` and `data`. The former is an + * object containing anything (`percent` for example), see each worker for more + * details. The latter is the real data (String, Uint8Array, etc). + * + * @constructor + * @param {String} name the name of the stream (mainly used for debugging purposes) + */ +function GenericWorker(name) { + // the name of the worker + this.name = name || "default"; + // an object containing metadata about the workers chain + this.streamInfo = {}; + // an error which happened when the worker was paused + this.generatedError = null; + // an object containing metadata to be merged by this worker into the general metadata + this.extraStreamInfo = {}; + // true if the stream is paused (and should not do anything), false otherwise + this.isPaused = true; + // true if the stream is finished (and should not do anything), false otherwise + this.isFinished = false; + // true if the stream is locked to prevent further structure updates (pipe), false otherwise + this.isLocked = false; + // the event listeners + this._listeners = { + 'data':[], + 'end':[], + 'error':[] + }; + // the previous worker, if any + this.previous = null; +} + +GenericWorker.prototype = { + /** + * Push a chunk to the next workers. + * @param {Object} chunk the chunk to push + */ + push : function (chunk) { + this.emit("data", chunk); + }, + /** + * End the stream. + * @return {Boolean} true if this call ended the worker, false otherwise. + */ + end : function () { + if (this.isFinished) { + return false; + } + + this.flush(); + try { + this.emit("end"); + this.cleanUp(); + this.isFinished = true; + } catch (e) { + this.emit("error", e); + } + return true; + }, + /** + * End the stream with an error. + * @param {Error} e the error which caused the premature end. + * @return {Boolean} true if this call ended the worker with an error, false otherwise. + */ + error : function (e) { + if (this.isFinished) { + return false; + } + + if(this.isPaused) { + this.generatedError = e; + } else { + this.isFinished = true; + + this.emit("error", e); + + // in the workers chain exploded in the middle of the chain, + // the error event will go downward but we also need to notify + // workers upward that there has been an error. + if(this.previous) { + this.previous.error(e); + } + + this.cleanUp(); + } + return true; + }, + /** + * Add a callback on an event. + * @param {String} name the name of the event (data, end, error) + * @param {Function} listener the function to call when the event is triggered + * @return {GenericWorker} the current object for chainability + */ + on : function (name, listener) { + this._listeners[name].push(listener); + return this; + }, + /** + * Clean any references when a worker is ending. + */ + cleanUp : function () { + this.streamInfo = this.generatedError = this.extraStreamInfo = null; + this._listeners = []; + }, + /** + * Trigger an event. This will call registered callback with the provided arg. + * @param {String} name the name of the event (data, end, error) + * @param {Object} arg the argument to call the callback with. + */ + emit : function (name, arg) { + if (this._listeners[name]) { + for(var i = 0; i < this._listeners[name].length; i++) { + this._listeners[name][i].call(this, arg); + } + } + }, + /** + * Chain a worker with an other. + * @param {Worker} next the worker receiving events from the current one. + * @return {worker} the next worker for chainability + */ + pipe : function (next) { + return next.registerPrevious(this); + }, + /** + * Same as `pipe` in the other direction. + * Using an API with `pipe(next)` is very easy. + * Implementing the API with the point of view of the next one registering + * a source is easier, see the ZipFileWorker. + * @param {Worker} previous the previous worker, sending events to this one + * @return {Worker} the current worker for chainability + */ + registerPrevious : function (previous) { + if (this.isLocked) { + throw new Error("The stream '" + this + "' has already been used."); + } + + // sharing the streamInfo... + this.streamInfo = previous.streamInfo; + // ... and adding our own bits + this.mergeStreamInfo(); + this.previous = previous; + var self = this; + previous.on('data', function (chunk) { + self.processChunk(chunk); + }); + previous.on('end', function () { + self.end(); + }); + previous.on('error', function (e) { + self.error(e); + }); + return this; + }, + /** + * Pause the stream so it doesn't send events anymore. + * @return {Boolean} true if this call paused the worker, false otherwise. + */ + pause : function () { + if(this.isPaused || this.isFinished) { + return false; + } + this.isPaused = true; + + if(this.previous) { + this.previous.pause(); + } + return true; + }, + /** + * Resume a paused stream. + * @return {Boolean} true if this call resumed the worker, false otherwise. + */ + resume : function () { + if(!this.isPaused || this.isFinished) { + return false; + } + this.isPaused = false; + + // if true, the worker tried to resume but failed + var withError = false; + if(this.generatedError) { + this.error(this.generatedError); + withError = true; + } + if(this.previous) { + this.previous.resume(); + } + + return !withError; + }, + /** + * Flush any remaining bytes as the stream is ending. + */ + flush : function () {}, + /** + * Process a chunk. This is usually the method overridden. + * @param {Object} chunk the chunk to process. + */ + processChunk : function(chunk) { + this.push(chunk); + }, + /** + * Add a key/value to be added in the workers chain streamInfo once activated. + * @param {String} key the key to use + * @param {Object} value the associated value + * @return {Worker} the current worker for chainability + */ + withStreamInfo : function (key, value) { + this.extraStreamInfo[key] = value; + this.mergeStreamInfo(); + return this; + }, + /** + * Merge this worker's streamInfo into the chain's streamInfo. + */ + mergeStreamInfo : function () { + for(var key in this.extraStreamInfo) { + if (!this.extraStreamInfo.hasOwnProperty(key)) { + continue; + } + this.streamInfo[key] = this.extraStreamInfo[key]; + } + }, + + /** + * Lock the stream to prevent further updates on the workers chain. + * After calling this method, all calls to pipe will fail. + */ + lock: function () { + if (this.isLocked) { + throw new Error("The stream '" + this + "' has already been used."); + } + this.isLocked = true; + if (this.previous) { + this.previous.lock(); + } + }, + + /** + * + * Pretty print the workers chain. + */ + toString : function () { + var me = "Worker " + this.name; + if (this.previous) { + return this.previous + " -> " + me; + } else { + return me; + } + } +}; + +module.exports = GenericWorker; + +},{}],29:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var ConvertWorker = require('./ConvertWorker'); +var GenericWorker = require('./GenericWorker'); +var base64 = require('../base64'); +var support = require("../support"); +var external = require("../external"); + +var NodejsStreamOutputAdapter = null; +if (support.nodestream) { + try { + NodejsStreamOutputAdapter = require('../nodejs/NodejsStreamOutputAdapter'); + } catch(e) {} +} + +/** + * Apply the final transformation of the data. If the user wants a Blob for + * example, it's easier to work with an U8intArray and finally do the + * ArrayBuffer/Blob conversion. + * @param {String} type the name of the final type + * @param {String|Uint8Array|Buffer} content the content to transform + * @param {String} mimeType the mime type of the content, if applicable. + * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the content in the right format. + */ +function transformZipOutput(type, content, mimeType) { + switch(type) { + case "blob" : + return utils.newBlob(utils.transformTo("arraybuffer", content), mimeType); + case "base64" : + return base64.encode(content); + default : + return utils.transformTo(type, content); + } +} + +/** + * Concatenate an array of data of the given type. + * @param {String} type the type of the data in the given array. + * @param {Array} dataArray the array containing the data chunks to concatenate + * @return {String|Uint8Array|Buffer} the concatenated data + * @throws Error if the asked type is unsupported + */ +function concat (type, dataArray) { + var i, index = 0, res = null, totalLength = 0; + for(i = 0; i < dataArray.length; i++) { + totalLength += dataArray[i].length; + } + switch(type) { + case "string": + return dataArray.join(""); + case "array": + return Array.prototype.concat.apply([], dataArray); + case "uint8array": + res = new Uint8Array(totalLength); + for(i = 0; i < dataArray.length; i++) { + res.set(dataArray[i], index); + index += dataArray[i].length; + } + return res; + case "nodebuffer": + return Buffer.concat(dataArray); + default: + throw new Error("concat : unsupported type '" + type + "'"); + } +} + +/** + * Listen a StreamHelper, accumulate its content and concatenate it into a + * complete block. + * @param {StreamHelper} helper the helper to use. + * @param {Function} updateCallback a callback called on each update. Called + * with one arg : + * - the metadata linked to the update received. + * @return Promise the promise for the accumulation. + */ +function accumulate(helper, updateCallback) { + return new external.Promise(function (resolve, reject){ + var dataArray = []; + var chunkType = helper._internalType, + resultType = helper._outputType, + mimeType = helper._mimeType; + helper + .on('data', function (data, meta) { + dataArray.push(data); + if(updateCallback) { + updateCallback(meta); + } + }) + .on('error', function(err) { + dataArray = []; + reject(err); + }) + .on('end', function (){ + try { + var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType); + resolve(result); + } catch (e) { + reject(e); + } + dataArray = []; + }) + .resume(); + }); +} + +/** + * An helper to easily use workers outside of JSZip. + * @constructor + * @param {Worker} worker the worker to wrap + * @param {String} outputType the type of data expected by the use + * @param {String} mimeType the mime type of the content, if applicable. + */ +function StreamHelper(worker, outputType, mimeType) { + var internalType = outputType; + switch(outputType) { + case "blob": + case "arraybuffer": + internalType = "uint8array"; + break; + case "base64": + internalType = "string"; + break; + } + + try { + // the type used internally + this._internalType = internalType; + // the type used to output results + this._outputType = outputType; + // the mime type + this._mimeType = mimeType; + utils.checkSupport(internalType); + this._worker = worker.pipe(new ConvertWorker(internalType)); + // the last workers can be rewired without issues but we need to + // prevent any updates on previous workers. + worker.lock(); + } catch(e) { + this._worker = new GenericWorker("error"); + this._worker.error(e); + } +} + +StreamHelper.prototype = { + /** + * Listen a StreamHelper, accumulate its content and concatenate it into a + * complete block. + * @param {Function} updateCb the update callback. + * @return Promise the promise for the accumulation. + */ + accumulate : function (updateCb) { + return accumulate(this, updateCb); + }, + /** + * Add a listener on an event triggered on a stream. + * @param {String} evt the name of the event + * @param {Function} fn the listener + * @return {StreamHelper} the current helper. + */ + on : function (evt, fn) { + var self = this; + + if(evt === "data") { + this._worker.on(evt, function (chunk) { + fn.call(self, chunk.data, chunk.meta); + }); + } else { + this._worker.on(evt, function () { + utils.delay(fn, arguments, self); + }); + } + return this; + }, + /** + * Resume the flow of chunks. + * @return {StreamHelper} the current helper. + */ + resume : function () { + utils.delay(this._worker.resume, [], this._worker); + return this; + }, + /** + * Pause the flow of chunks. + * @return {StreamHelper} the current helper. + */ + pause : function () { + this._worker.pause(); + return this; + }, + /** + * Return a nodejs stream for this helper. + * @param {Function} updateCb the update callback. + * @return {NodejsStreamOutputAdapter} the nodejs stream. + */ + toNodejsStream : function (updateCb) { + utils.checkSupport("nodestream"); + if (this._outputType !== "nodebuffer") { + // an object stream containing blob/arraybuffer/uint8array/string + // is strange and I don't know if it would be useful. + // I you find this comment and have a good usecase, please open a + // bug report ! + throw new Error(this._outputType + " is not supported by this method"); + } + + return new NodejsStreamOutputAdapter(this, { + objectMode : this._outputType !== "nodebuffer" + }, updateCb); + } +}; + + +module.exports = StreamHelper; + +},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(require,module,exports){ +'use strict'; + +exports.base64 = true; +exports.array = true; +exports.string = true; +exports.arraybuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined"; +exports.nodebuffer = typeof Buffer !== "undefined"; +// contains true if JSZip can read/generate Uint8Array, false otherwise. +exports.uint8array = typeof Uint8Array !== "undefined"; + +if (typeof ArrayBuffer === "undefined") { + exports.blob = false; +} +else { + var buffer = new ArrayBuffer(0); + try { + exports.blob = new Blob([buffer], { + type: "application/zip" + }).size === 0; + } + catch (e) { + try { + var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder; + var builder = new Builder(); + builder.append(buffer); + exports.blob = builder.getBlob('application/zip').size === 0; + } + catch (e) { + exports.blob = false; + } + } +} + +try { + exports.nodestream = !!require('readable-stream').Readable; +} catch(e) { + exports.nodestream = false; +} + +},{"readable-stream":16}],31:[function(require,module,exports){ +'use strict'; + +var utils = require('./utils'); +var support = require('./support'); +var nodejsUtils = require('./nodejsUtils'); +var GenericWorker = require('./stream/GenericWorker'); + +/** + * The following functions come from pako, from pako/lib/utils/strings + * released under the MIT license, see pako https://github.com/nodeca/pako/ + */ + +// Table with utf8 lengths (calculated by first byte of sequence) +// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, +// because max possible codepoint is 0x10ffff +var _utf8len = new Array(256); +for (var i=0; i<256; i++) { + _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1); +} +_utf8len[254]=_utf8len[254]=1; // Invalid sequence start + +// convert string to array (typed, when possible) +var string2buf = function (str) { + var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; + + // count binary size + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { + c2 = str.charCodeAt(m_pos+1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; + } + + // allocate buffer + if (support.uint8array) { + buf = new Uint8Array(buf_len); + } else { + buf = new Array(buf_len); + } + + // convert + for (i=0, m_pos = 0; i < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { + c2 = str.charCodeAt(m_pos+1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + if (c < 0x80) { + /* one byte */ + buf[i++] = c; + } else if (c < 0x800) { + /* two bytes */ + buf[i++] = 0xC0 | (c >>> 6); + buf[i++] = 0x80 | (c & 0x3f); + } else if (c < 0x10000) { + /* three bytes */ + buf[i++] = 0xE0 | (c >>> 12); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } else { + /* four bytes */ + buf[i++] = 0xf0 | (c >>> 18); + buf[i++] = 0x80 | (c >>> 12 & 0x3f); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } + } + + return buf; +}; + +// Calculate max possible position in utf8 buffer, +// that will not break sequence. If that's not possible +// - (very small limits) return max size as is. +// +// buf[] - utf8 bytes array +// max - length limit (mandatory); +var utf8border = function(buf, max) { + var pos; + + max = max || buf.length; + if (max > buf.length) { max = buf.length; } + + // go back from last position, until start of sequence found + pos = max-1; + while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } + + // Fuckup - very small and broken sequence, + // return max, because we should return something anyway. + if (pos < 0) { return max; } + + // If we came to start of buffer - that means vuffer is too small, + // return max too. + if (pos === 0) { return max; } + + return (pos + _utf8len[buf[pos]] > max) ? pos : max; +}; + +// convert array to string +var buf2string = function (buf) { + var str, i, out, c, c_len; + var len = buf.length; + + // Reserve max possible length (2 words per char) + // NB: by unknown reasons, Array is significantly faster for + // String.fromCharCode.apply than Uint16Array. + var utf16buf = new Array(len*2); + + for (out=0, i=0; i 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; } + + // apply mask on first byte + c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; + // join the rest + while (c_len > 1 && i < len) { + c = (c << 6) | (buf[i++] & 0x3f); + c_len--; + } + + // terminated by end of string? + if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } + + if (c < 0x10000) { + utf16buf[out++] = c; + } else { + c -= 0x10000; + utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); + utf16buf[out++] = 0xdc00 | (c & 0x3ff); + } + } + + // shrinkBuf(utf16buf, out) + if (utf16buf.length !== out) { + if(utf16buf.subarray) { + utf16buf = utf16buf.subarray(0, out); + } else { + utf16buf.length = out; + } + } + + // return String.fromCharCode.apply(null, utf16buf); + return utils.applyFromCharCode(utf16buf); +}; + + +// That's all for the pako functions. + + +/** + * Transform a javascript string into an array (typed if possible) of bytes, + * UTF-8 encoded. + * @param {String} str the string to encode + * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string. + */ +exports.utf8encode = function utf8encode(str) { + if (support.nodebuffer) { + return nodejsUtils.newBufferFrom(str, "utf-8"); + } + + return string2buf(str); +}; + + +/** + * Transform a bytes array (or a representation) representing an UTF-8 encoded + * string into a javascript string. + * @param {Array|Uint8Array|Buffer} buf the data de decode + * @return {String} the decoded string. + */ +exports.utf8decode = function utf8decode(buf) { + if (support.nodebuffer) { + return utils.transformTo("nodebuffer", buf).toString("utf-8"); + } + + buf = utils.transformTo(support.uint8array ? "uint8array" : "array", buf); + + return buf2string(buf); +}; + +/** + * A worker to decode utf8 encoded binary chunks into string chunks. + * @constructor + */ +function Utf8DecodeWorker() { + GenericWorker.call(this, "utf-8 decode"); + // the last bytes if a chunk didn't end with a complete codepoint. + this.leftOver = null; +} +utils.inherits(Utf8DecodeWorker, GenericWorker); + +/** + * @see GenericWorker.processChunk + */ +Utf8DecodeWorker.prototype.processChunk = function (chunk) { + + var data = utils.transformTo(support.uint8array ? "uint8array" : "array", chunk.data); + + // 1st step, re-use what's left of the previous chunk + if (this.leftOver && this.leftOver.length) { + if(support.uint8array) { + var previousData = data; + data = new Uint8Array(previousData.length + this.leftOver.length); + data.set(this.leftOver, 0); + data.set(previousData, this.leftOver.length); + } else { + data = this.leftOver.concat(data); + } + this.leftOver = null; + } + + var nextBoundary = utf8border(data); + var usableData = data; + if (nextBoundary !== data.length) { + if (support.uint8array) { + usableData = data.subarray(0, nextBoundary); + this.leftOver = data.subarray(nextBoundary, data.length); + } else { + usableData = data.slice(0, nextBoundary); + this.leftOver = data.slice(nextBoundary, data.length); + } + } + + this.push({ + data : exports.utf8decode(usableData), + meta : chunk.meta + }); +}; + +/** + * @see GenericWorker.flush + */ +Utf8DecodeWorker.prototype.flush = function () { + if(this.leftOver && this.leftOver.length) { + this.push({ + data : exports.utf8decode(this.leftOver), + meta : {} + }); + this.leftOver = null; + } +}; +exports.Utf8DecodeWorker = Utf8DecodeWorker; + +/** + * A worker to endcode string chunks into utf8 encoded binary chunks. + * @constructor + */ +function Utf8EncodeWorker() { + GenericWorker.call(this, "utf-8 encode"); +} +utils.inherits(Utf8EncodeWorker, GenericWorker); + +/** + * @see GenericWorker.processChunk + */ +Utf8EncodeWorker.prototype.processChunk = function (chunk) { + this.push({ + data : exports.utf8encode(chunk.data), + meta : chunk.meta + }); +}; +exports.Utf8EncodeWorker = Utf8EncodeWorker; + +},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(require,module,exports){ +'use strict'; + +var support = require('./support'); +var base64 = require('./base64'); +var nodejsUtils = require('./nodejsUtils'); +var setImmediate = require('set-immediate-shim'); +var external = require("./external"); + + +/** + * Convert a string that pass as a "binary string": it should represent a byte + * array but may have > 255 char codes. Be sure to take only the first byte + * and returns the byte array. + * @param {String} str the string to transform. + * @return {Array|Uint8Array} the string in a binary format. + */ +function string2binary(str) { + var result = null; + if (support.uint8array) { + result = new Uint8Array(str.length); + } else { + result = new Array(str.length); + } + return stringToArrayLike(str, result); +} + +/** + * Create a new blob with the given content and the given type. + * @param {String|ArrayBuffer} part the content to put in the blob. DO NOT use + * an Uint8Array because the stock browser of android 4 won't accept it (it + * will be silently converted to a string, "[object Uint8Array]"). + * + * Use only ONE part to build the blob to avoid a memory leak in IE11 / Edge: + * when a large amount of Array is used to create the Blob, the amount of + * memory consumed is nearly 100 times the original data amount. + * + * @param {String} type the mime type of the blob. + * @return {Blob} the created blob. + */ +exports.newBlob = function(part, type) { + exports.checkSupport("blob"); + + try { + // Blob constructor + return new Blob([part], { + type: type + }); + } + catch (e) { + + try { + // deprecated, browser only, old way + var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder; + var builder = new Builder(); + builder.append(part); + return builder.getBlob(type); + } + catch (e) { + + // well, fuck ?! + throw new Error("Bug : can't construct the Blob."); + } + } + + +}; +/** + * The identity function. + * @param {Object} input the input. + * @return {Object} the same input. + */ +function identity(input) { + return input; +} + +/** + * Fill in an array with a string. + * @param {String} str the string to use. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated). + * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array. + */ +function stringToArrayLike(str, array) { + for (var i = 0; i < str.length; ++i) { + array[i] = str.charCodeAt(i) & 0xFF; + } + return array; +} + +/** + * An helper for the function arrayLikeToString. + * This contains static information and functions that + * can be optimized by the browser JIT compiler. + */ +var arrayToStringHelper = { + /** + * Transform an array of int into a string, chunk by chunk. + * See the performances notes on arrayLikeToString. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. + * @param {String} type the type of the array. + * @param {Integer} chunk the chunk size. + * @return {String} the resulting string. + * @throws Error if the chunk is too big for the stack. + */ + stringifyByChunk: function(array, type, chunk) { + var result = [], k = 0, len = array.length; + // shortcut + if (len <= chunk) { + return String.fromCharCode.apply(null, array); + } + while (k < len) { + if (type === "array" || type === "nodebuffer") { + result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len)))); + } + else { + result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len)))); + } + k += chunk; + } + return result.join(""); + }, + /** + * Call String.fromCharCode on every item in the array. + * This is the naive implementation, which generate A LOT of intermediate string. + * This should be used when everything else fail. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. + * @return {String} the result. + */ + stringifyByChar: function(array){ + var resultStr = ""; + for(var i = 0; i < array.length; i++) { + resultStr += String.fromCharCode(array[i]); + } + return resultStr; + }, + applyCanBeUsed : { + /** + * true if the browser accepts to use String.fromCharCode on Uint8Array + */ + uint8array : (function () { + try { + return support.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1; + } catch (e) { + return false; + } + })(), + /** + * true if the browser accepts to use String.fromCharCode on nodejs Buffer. + */ + nodebuffer : (function () { + try { + return support.nodebuffer && String.fromCharCode.apply(null, nodejsUtils.allocBuffer(1)).length === 1; + } catch (e) { + return false; + } + })() + } +}; + +/** + * Transform an array-like object to a string. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. + * @return {String} the result. + */ +function arrayLikeToString(array) { + // Performances notes : + // -------------------- + // String.fromCharCode.apply(null, array) is the fastest, see + // see http://jsperf.com/converting-a-uint8array-to-a-string/2 + // but the stack is limited (and we can get huge arrays !). + // + // result += String.fromCharCode(array[i]); generate too many strings ! + // + // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2 + // TODO : we now have workers that split the work. Do we still need that ? + var chunk = 65536, + type = exports.getTypeOf(array), + canUseApply = true; + if (type === "uint8array") { + canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array; + } else if (type === "nodebuffer") { + canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer; + } + + if (canUseApply) { + while (chunk > 1) { + try { + return arrayToStringHelper.stringifyByChunk(array, type, chunk); + } catch (e) { + chunk = Math.floor(chunk / 2); + } + } + } + + // no apply or chunk error : slow and painful algorithm + // default browser on android 4.* + return arrayToStringHelper.stringifyByChar(array); +} + +exports.applyFromCharCode = arrayLikeToString; + + +/** + * Copy the data from an array-like to an other array-like. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated. + * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array. + */ +function arrayLikeToArrayLike(arrayFrom, arrayTo) { + for (var i = 0; i < arrayFrom.length; i++) { + arrayTo[i] = arrayFrom[i]; + } + return arrayTo; +} + +// a matrix containing functions to transform everything into everything. +var transform = {}; + +// string to ? +transform["string"] = { + "string": identity, + "array": function(input) { + return stringToArrayLike(input, new Array(input.length)); + }, + "arraybuffer": function(input) { + return transform["string"]["uint8array"](input).buffer; + }, + "uint8array": function(input) { + return stringToArrayLike(input, new Uint8Array(input.length)); + }, + "nodebuffer": function(input) { + return stringToArrayLike(input, nodejsUtils.allocBuffer(input.length)); + } +}; + +// array to ? +transform["array"] = { + "string": arrayLikeToString, + "array": identity, + "arraybuffer": function(input) { + return (new Uint8Array(input)).buffer; + }, + "uint8array": function(input) { + return new Uint8Array(input); + }, + "nodebuffer": function(input) { + return nodejsUtils.newBufferFrom(input); + } +}; + +// arraybuffer to ? +transform["arraybuffer"] = { + "string": function(input) { + return arrayLikeToString(new Uint8Array(input)); + }, + "array": function(input) { + return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength)); + }, + "arraybuffer": identity, + "uint8array": function(input) { + return new Uint8Array(input); + }, + "nodebuffer": function(input) { + return nodejsUtils.newBufferFrom(new Uint8Array(input)); + } +}; + +// uint8array to ? +transform["uint8array"] = { + "string": arrayLikeToString, + "array": function(input) { + return arrayLikeToArrayLike(input, new Array(input.length)); + }, + "arraybuffer": function(input) { + return input.buffer; + }, + "uint8array": identity, + "nodebuffer": function(input) { + return nodejsUtils.newBufferFrom(input); + } +}; + +// nodebuffer to ? +transform["nodebuffer"] = { + "string": arrayLikeToString, + "array": function(input) { + return arrayLikeToArrayLike(input, new Array(input.length)); + }, + "arraybuffer": function(input) { + return transform["nodebuffer"]["uint8array"](input).buffer; + }, + "uint8array": function(input) { + return arrayLikeToArrayLike(input, new Uint8Array(input.length)); + }, + "nodebuffer": identity +}; + +/** + * Transform an input into any type. + * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer. + * If no output type is specified, the unmodified input will be returned. + * @param {String} outputType the output type. + * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert. + * @throws {Error} an Error if the browser doesn't support the requested output type. + */ +exports.transformTo = function(outputType, input) { + if (!input) { + // undefined, null, etc + // an empty string won't harm. + input = ""; + } + if (!outputType) { + return input; + } + exports.checkSupport(outputType); + var inputType = exports.getTypeOf(input); + var result = transform[inputType][outputType](input); + return result; +}; + +/** + * Return the type of the input. + * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer. + * @param {Object} input the input to identify. + * @return {String} the (lowercase) type of the input. + */ +exports.getTypeOf = function(input) { + if (typeof input === "string") { + return "string"; + } + if (Object.prototype.toString.call(input) === "[object Array]") { + return "array"; + } + if (support.nodebuffer && nodejsUtils.isBuffer(input)) { + return "nodebuffer"; + } + if (support.uint8array && input instanceof Uint8Array) { + return "uint8array"; + } + if (support.arraybuffer && input instanceof ArrayBuffer) { + return "arraybuffer"; + } +}; + +/** + * Throw an exception if the type is not supported. + * @param {String} type the type to check. + * @throws {Error} an Error if the browser doesn't support the requested type. + */ +exports.checkSupport = function(type) { + var supported = support[type.toLowerCase()]; + if (!supported) { + throw new Error(type + " is not supported by this platform"); + } +}; + +exports.MAX_VALUE_16BITS = 65535; +exports.MAX_VALUE_32BITS = -1; // well, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" is parsed as -1 + +/** + * Prettify a string read as binary. + * @param {string} str the string to prettify. + * @return {string} a pretty string. + */ +exports.pretty = function(str) { + var res = '', + code, i; + for (i = 0; i < (str || "").length; i++) { + code = str.charCodeAt(i); + res += '\\x' + (code < 16 ? "0" : "") + code.toString(16).toUpperCase(); + } + return res; +}; + +/** + * Defer the call of a function. + * @param {Function} callback the function to call asynchronously. + * @param {Array} args the arguments to give to the callback. + */ +exports.delay = function(callback, args, self) { + setImmediate(function () { + callback.apply(self || null, args || []); + }); +}; + +/** + * Extends a prototype with an other, without calling a constructor with + * side effects. Inspired by nodejs' `utils.inherits` + * @param {Function} ctor the constructor to augment + * @param {Function} superCtor the parent constructor to use + */ +exports.inherits = function (ctor, superCtor) { + var Obj = function() {}; + Obj.prototype = superCtor.prototype; + ctor.prototype = new Obj(); +}; + +/** + * Merge the objects passed as parameters into a new one. + * @private + * @param {...Object} var_args All objects to merge. + * @return {Object} a new object with the data of the others. + */ +exports.extend = function() { + var result = {}, i, attr; + for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers + for (attr in arguments[i]) { + if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === "undefined") { + result[attr] = arguments[i][attr]; + } + } + } + return result; +}; + +/** + * Transform arbitrary content into a Promise. + * @param {String} name a name for the content being processed. + * @param {Object} inputData the content to process. + * @param {Boolean} isBinary true if the content is not an unicode string + * @param {Boolean} isOptimizedBinaryString true if the string content only has one byte per character. + * @param {Boolean} isBase64 true if the string content is encoded with base64. + * @return {Promise} a promise in a format usable by JSZip. + */ +exports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) { + + // if inputData is already a promise, this flatten it. + var promise = external.Promise.resolve(inputData).then(function(data) { + + + var isBlob = support.blob && (data instanceof Blob || ['[object File]', '[object Blob]'].indexOf(Object.prototype.toString.call(data)) !== -1); + + if (isBlob && typeof FileReader !== "undefined") { + return new external.Promise(function (resolve, reject) { + var reader = new FileReader(); + + reader.onload = function(e) { + resolve(e.target.result); + }; + reader.onerror = function(e) { + reject(e.target.error); + }; + reader.readAsArrayBuffer(data); + }); + } else { + return data; + } + }); + + return promise.then(function(data) { + var dataType = exports.getTypeOf(data); + + if (!dataType) { + return external.Promise.reject( + new Error("Can't read the data of '" + name + "'. Is it " + + "in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?") + ); + } + // special case : it's way easier to work with Uint8Array than with ArrayBuffer + if (dataType === "arraybuffer") { + data = exports.transformTo("uint8array", data); + } else if (dataType === "string") { + if (isBase64) { + data = base64.decode(data); + } + else if (isBinary) { + // optimizedBinaryString === true means that the file has already been filtered with a 0xFF mask + if (isOptimizedBinaryString !== true) { + // this is a string, not in a base64 format. + // Be sure that this is a correct "binary string" + data = string2binary(data); + } + } + } + return data; + }); +}; + +},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(require,module,exports){ +'use strict'; +var readerFor = require('./reader/readerFor'); +var utils = require('./utils'); +var sig = require('./signature'); +var ZipEntry = require('./zipEntry'); +var utf8 = require('./utf8'); +var support = require('./support'); +// class ZipEntries {{{ +/** + * All the entries in the zip file. + * @constructor + * @param {Object} loadOptions Options for loading the stream. + */ +function ZipEntries(loadOptions) { + this.files = []; + this.loadOptions = loadOptions; +} +ZipEntries.prototype = { + /** + * Check that the reader is on the specified signature. + * @param {string} expectedSignature the expected signature. + * @throws {Error} if it is an other signature. + */ + checkSignature: function(expectedSignature) { + if (!this.reader.readAndCheckSignature(expectedSignature)) { + this.reader.index -= 4; + var signature = this.reader.readString(4); + throw new Error("Corrupted zip or bug: unexpected signature " + "(" + utils.pretty(signature) + ", expected " + utils.pretty(expectedSignature) + ")"); + } + }, + /** + * Check if the given signature is at the given index. + * @param {number} askedIndex the index to check. + * @param {string} expectedSignature the signature to expect. + * @return {boolean} true if the signature is here, false otherwise. + */ + isSignature: function(askedIndex, expectedSignature) { + var currentIndex = this.reader.index; + this.reader.setIndex(askedIndex); + var signature = this.reader.readString(4); + var result = signature === expectedSignature; + this.reader.setIndex(currentIndex); + return result; + }, + /** + * Read the end of the central directory. + */ + readBlockEndOfCentral: function() { + this.diskNumber = this.reader.readInt(2); + this.diskWithCentralDirStart = this.reader.readInt(2); + this.centralDirRecordsOnThisDisk = this.reader.readInt(2); + this.centralDirRecords = this.reader.readInt(2); + this.centralDirSize = this.reader.readInt(4); + this.centralDirOffset = this.reader.readInt(4); + + this.zipCommentLength = this.reader.readInt(2); + // warning : the encoding depends of the system locale + // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded. + // On a windows machine, this field is encoded with the localized windows code page. + var zipComment = this.reader.readData(this.zipCommentLength); + var decodeParamType = support.uint8array ? "uint8array" : "array"; + // To get consistent behavior with the generation part, we will assume that + // this is utf8 encoded unless specified otherwise. + var decodeContent = utils.transformTo(decodeParamType, zipComment); + this.zipComment = this.loadOptions.decodeFileName(decodeContent); + }, + /** + * Read the end of the Zip 64 central directory. + * Not merged with the method readEndOfCentral : + * The end of central can coexist with its Zip64 brother, + * I don't want to read the wrong number of bytes ! + */ + readBlockZip64EndOfCentral: function() { + this.zip64EndOfCentralSize = this.reader.readInt(8); + this.reader.skip(4); + // this.versionMadeBy = this.reader.readString(2); + // this.versionNeeded = this.reader.readInt(2); + this.diskNumber = this.reader.readInt(4); + this.diskWithCentralDirStart = this.reader.readInt(4); + this.centralDirRecordsOnThisDisk = this.reader.readInt(8); + this.centralDirRecords = this.reader.readInt(8); + this.centralDirSize = this.reader.readInt(8); + this.centralDirOffset = this.reader.readInt(8); + + this.zip64ExtensibleData = {}; + var extraDataSize = this.zip64EndOfCentralSize - 44, + index = 0, + extraFieldId, + extraFieldLength, + extraFieldValue; + while (index < extraDataSize) { + extraFieldId = this.reader.readInt(2); + extraFieldLength = this.reader.readInt(4); + extraFieldValue = this.reader.readData(extraFieldLength); + this.zip64ExtensibleData[extraFieldId] = { + id: extraFieldId, + length: extraFieldLength, + value: extraFieldValue + }; + } + }, + /** + * Read the end of the Zip 64 central directory locator. + */ + readBlockZip64EndOfCentralLocator: function() { + this.diskWithZip64CentralDirStart = this.reader.readInt(4); + this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8); + this.disksCount = this.reader.readInt(4); + if (this.disksCount > 1) { + throw new Error("Multi-volumes zip are not supported"); + } + }, + /** + * Read the local files, based on the offset read in the central part. + */ + readLocalFiles: function() { + var i, file; + for (i = 0; i < this.files.length; i++) { + file = this.files[i]; + this.reader.setIndex(file.localHeaderOffset); + this.checkSignature(sig.LOCAL_FILE_HEADER); + file.readLocalPart(this.reader); + file.handleUTF8(); + file.processAttributes(); + } + }, + /** + * Read the central directory. + */ + readCentralDir: function() { + var file; + + this.reader.setIndex(this.centralDirOffset); + while (this.reader.readAndCheckSignature(sig.CENTRAL_FILE_HEADER)) { + file = new ZipEntry({ + zip64: this.zip64 + }, this.loadOptions); + file.readCentralPart(this.reader); + this.files.push(file); + } + + if (this.centralDirRecords !== this.files.length) { + if (this.centralDirRecords !== 0 && this.files.length === 0) { + // We expected some records but couldn't find ANY. + // This is really suspicious, as if something went wrong. + throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length); + } else { + // We found some records but not all. + // Something is wrong but we got something for the user: no error here. + // console.warn("expected", this.centralDirRecords, "records in central dir, got", this.files.length); + } + } + }, + /** + * Read the end of central directory. + */ + readEndOfCentral: function() { + var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END); + if (offset < 0) { + // Check if the content is a truncated zip or complete garbage. + // A "LOCAL_FILE_HEADER" is not required at the beginning (auto + // extractible zip for example) but it can give a good hint. + // If an ajax request was used without responseType, we will also + // get unreadable data. + var isGarbage = !this.isSignature(0, sig.LOCAL_FILE_HEADER); + + if (isGarbage) { + throw new Error("Can't find end of central directory : is this a zip file ? " + + "If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"); + } else { + throw new Error("Corrupted zip: can't find end of central directory"); + } + + } + this.reader.setIndex(offset); + var endOfCentralDirOffset = offset; + this.checkSignature(sig.CENTRAL_DIRECTORY_END); + this.readBlockEndOfCentral(); + + + /* extract from the zip spec : + 4) If one of the fields in the end of central directory + record is too small to hold required data, the field + should be set to -1 (0xFFFF or 0xFFFFFFFF) and the + ZIP64 format record should be created. + 5) The end of central directory record and the + Zip64 end of central directory locator record must + reside on the same disk when splitting or spanning + an archive. + */ + if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) { + this.zip64 = true; + + /* + Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from + the zip file can fit into a 32bits integer. This cannot be solved : JavaScript represents + all numbers as 64-bit double precision IEEE 754 floating point numbers. + So, we have 53bits for integers and bitwise operations treat everything as 32bits. + see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators + and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5 + */ + + // should look for a zip64 EOCD locator + offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR); + if (offset < 0) { + throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator"); + } + this.reader.setIndex(offset); + this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR); + this.readBlockZip64EndOfCentralLocator(); + + // now the zip64 EOCD record + if (!this.isSignature(this.relativeOffsetEndOfZip64CentralDir, sig.ZIP64_CENTRAL_DIRECTORY_END)) { + // console.warn("ZIP64 end of central directory not where expected."); + this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_END); + if (this.relativeOffsetEndOfZip64CentralDir < 0) { + throw new Error("Corrupted zip: can't find the ZIP64 end of central directory"); + } + } + this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir); + this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END); + this.readBlockZip64EndOfCentral(); + } + + var expectedEndOfCentralDirOffset = this.centralDirOffset + this.centralDirSize; + if (this.zip64) { + expectedEndOfCentralDirOffset += 20; // end of central dir 64 locator + expectedEndOfCentralDirOffset += 12 /* should not include the leading 12 bytes */ + this.zip64EndOfCentralSize; + } + + var extraBytes = endOfCentralDirOffset - expectedEndOfCentralDirOffset; + + if (extraBytes > 0) { + // console.warn(extraBytes, "extra bytes at beginning or within zipfile"); + if (this.isSignature(endOfCentralDirOffset, sig.CENTRAL_FILE_HEADER)) { + // The offsets seem wrong, but we have something at the specified offset. + // So… we keep it. + } else { + // the offset is wrong, update the "zero" of the reader + // this happens if data has been prepended (crx files for example) + this.reader.zero = extraBytes; + } + } else if (extraBytes < 0) { + throw new Error("Corrupted zip: missing " + Math.abs(extraBytes) + " bytes."); + } + }, + prepareReader: function(data) { + this.reader = readerFor(data); + }, + /** + * Read a zip file and create ZipEntries. + * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file. + */ + load: function(data) { + this.prepareReader(data); + this.readEndOfCentral(); + this.readCentralDir(); + this.readLocalFiles(); + } +}; +// }}} end of ZipEntries +module.exports = ZipEntries; + +},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(require,module,exports){ +'use strict'; +var readerFor = require('./reader/readerFor'); +var utils = require('./utils'); +var CompressedObject = require('./compressedObject'); +var crc32fn = require('./crc32'); +var utf8 = require('./utf8'); +var compressions = require('./compressions'); +var support = require('./support'); + +var MADE_BY_DOS = 0x00; +var MADE_BY_UNIX = 0x03; + +/** + * Find a compression registered in JSZip. + * @param {string} compressionMethod the method magic to find. + * @return {Object|null} the JSZip compression object, null if none found. + */ +var findCompression = function(compressionMethod) { + for (var method in compressions) { + if (!compressions.hasOwnProperty(method)) { + continue; + } + if (compressions[method].magic === compressionMethod) { + return compressions[method]; + } + } + return null; +}; + +// class ZipEntry {{{ +/** + * An entry in the zip file. + * @constructor + * @param {Object} options Options of the current file. + * @param {Object} loadOptions Options for loading the stream. + */ +function ZipEntry(options, loadOptions) { + this.options = options; + this.loadOptions = loadOptions; +} +ZipEntry.prototype = { + /** + * say if the file is encrypted. + * @return {boolean} true if the file is encrypted, false otherwise. + */ + isEncrypted: function() { + // bit 1 is set + return (this.bitFlag & 0x0001) === 0x0001; + }, + /** + * say if the file has utf-8 filename/comment. + * @return {boolean} true if the filename/comment is in utf-8, false otherwise. + */ + useUTF8: function() { + // bit 11 is set + return (this.bitFlag & 0x0800) === 0x0800; + }, + /** + * Read the local part of a zip file and add the info in this object. + * @param {DataReader} reader the reader to use. + */ + readLocalPart: function(reader) { + var compression, localExtraFieldsLength; + + // we already know everything from the central dir ! + // If the central dir data are false, we are doomed. + // On the bright side, the local part is scary : zip64, data descriptors, both, etc. + // The less data we get here, the more reliable this should be. + // Let's skip the whole header and dash to the data ! + reader.skip(22); + // in some zip created on windows, the filename stored in the central dir contains \ instead of /. + // Strangely, the filename here is OK. + // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes + // or APPNOTE#4.4.17.1, "All slashes MUST be forward slashes '/'") but there are a lot of bad zip generators... + // Search "unzip mismatching "local" filename continuing with "central" filename version" on + // the internet. + // + // I think I see the logic here : the central directory is used to display + // content and the local directory is used to extract the files. Mixing / and \ + // may be used to display \ to windows users and use / when extracting the files. + // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394 + this.fileNameLength = reader.readInt(2); + localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir + // the fileName is stored as binary data, the handleUTF8 method will take care of the encoding. + this.fileName = reader.readData(this.fileNameLength); + reader.skip(localExtraFieldsLength); + + if (this.compressedSize === -1 || this.uncompressedSize === -1) { + throw new Error("Bug or corrupted zip : didn't get enough information from the central directory " + "(compressedSize === -1 || uncompressedSize === -1)"); + } + + compression = findCompression(this.compressionMethod); + if (compression === null) { // no compression found + throw new Error("Corrupted zip : compression " + utils.pretty(this.compressionMethod) + " unknown (inner file : " + utils.transformTo("string", this.fileName) + ")"); + } + this.decompressed = new CompressedObject(this.compressedSize, this.uncompressedSize, this.crc32, compression, reader.readData(this.compressedSize)); + }, + + /** + * Read the central part of a zip file and add the info in this object. + * @param {DataReader} reader the reader to use. + */ + readCentralPart: function(reader) { + this.versionMadeBy = reader.readInt(2); + reader.skip(2); + // this.versionNeeded = reader.readInt(2); + this.bitFlag = reader.readInt(2); + this.compressionMethod = reader.readString(2); + this.date = reader.readDate(); + this.crc32 = reader.readInt(4); + this.compressedSize = reader.readInt(4); + this.uncompressedSize = reader.readInt(4); + var fileNameLength = reader.readInt(2); + this.extraFieldsLength = reader.readInt(2); + this.fileCommentLength = reader.readInt(2); + this.diskNumberStart = reader.readInt(2); + this.internalFileAttributes = reader.readInt(2); + this.externalFileAttributes = reader.readInt(4); + this.localHeaderOffset = reader.readInt(4); + + if (this.isEncrypted()) { + throw new Error("Encrypted zip are not supported"); + } + + // will be read in the local part, see the comments there + reader.skip(fileNameLength); + this.readExtraFields(reader); + this.parseZIP64ExtraField(reader); + this.fileComment = reader.readData(this.fileCommentLength); + }, + + /** + * Parse the external file attributes and get the unix/dos permissions. + */ + processAttributes: function () { + this.unixPermissions = null; + this.dosPermissions = null; + var madeBy = this.versionMadeBy >> 8; + + // Check if we have the DOS directory flag set. + // We look for it in the DOS and UNIX permissions + // but some unknown platform could set it as a compatibility flag. + this.dir = this.externalFileAttributes & 0x0010 ? true : false; + + if(madeBy === MADE_BY_DOS) { + // first 6 bits (0 to 5) + this.dosPermissions = this.externalFileAttributes & 0x3F; + } + + if(madeBy === MADE_BY_UNIX) { + this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF; + // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8); + } + + // fail safe : if the name ends with a / it probably means a folder + if (!this.dir && this.fileNameStr.slice(-1) === '/') { + this.dir = true; + } + }, + + /** + * Parse the ZIP64 extra field and merge the info in the current ZipEntry. + * @param {DataReader} reader the reader to use. + */ + parseZIP64ExtraField: function(reader) { + + if (!this.extraFields[0x0001]) { + return; + } + + // should be something, preparing the extra reader + var extraReader = readerFor(this.extraFields[0x0001].value); + + // I really hope that these 64bits integer can fit in 32 bits integer, because js + // won't let us have more. + if (this.uncompressedSize === utils.MAX_VALUE_32BITS) { + this.uncompressedSize = extraReader.readInt(8); + } + if (this.compressedSize === utils.MAX_VALUE_32BITS) { + this.compressedSize = extraReader.readInt(8); + } + if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) { + this.localHeaderOffset = extraReader.readInt(8); + } + if (this.diskNumberStart === utils.MAX_VALUE_32BITS) { + this.diskNumberStart = extraReader.readInt(4); + } + }, + /** + * Read the central part of a zip file and add the info in this object. + * @param {DataReader} reader the reader to use. + */ + readExtraFields: function(reader) { + var end = reader.index + this.extraFieldsLength, + extraFieldId, + extraFieldLength, + extraFieldValue; + + if (!this.extraFields) { + this.extraFields = {}; + } + + while (reader.index + 4 < end) { + extraFieldId = reader.readInt(2); + extraFieldLength = reader.readInt(2); + extraFieldValue = reader.readData(extraFieldLength); + + this.extraFields[extraFieldId] = { + id: extraFieldId, + length: extraFieldLength, + value: extraFieldValue + }; + } + + reader.setIndex(end); + }, + /** + * Apply an UTF8 transformation if needed. + */ + handleUTF8: function() { + var decodeParamType = support.uint8array ? "uint8array" : "array"; + if (this.useUTF8()) { + this.fileNameStr = utf8.utf8decode(this.fileName); + this.fileCommentStr = utf8.utf8decode(this.fileComment); + } else { + var upath = this.findExtraFieldUnicodePath(); + if (upath !== null) { + this.fileNameStr = upath; + } else { + // ASCII text or unsupported code page + var fileNameByteArray = utils.transformTo(decodeParamType, this.fileName); + this.fileNameStr = this.loadOptions.decodeFileName(fileNameByteArray); + } + + var ucomment = this.findExtraFieldUnicodeComment(); + if (ucomment !== null) { + this.fileCommentStr = ucomment; + } else { + // ASCII text or unsupported code page + var commentByteArray = utils.transformTo(decodeParamType, this.fileComment); + this.fileCommentStr = this.loadOptions.decodeFileName(commentByteArray); + } + } + }, + + /** + * Find the unicode path declared in the extra field, if any. + * @return {String} the unicode path, null otherwise. + */ + findExtraFieldUnicodePath: function() { + var upathField = this.extraFields[0x7075]; + if (upathField) { + var extraReader = readerFor(upathField.value); + + // wrong version + if (extraReader.readInt(1) !== 1) { + return null; + } + + // the crc of the filename changed, this field is out of date. + if (crc32fn(this.fileName) !== extraReader.readInt(4)) { + return null; + } + + return utf8.utf8decode(extraReader.readData(upathField.length - 5)); + } + return null; + }, + + /** + * Find the unicode comment declared in the extra field, if any. + * @return {String} the unicode comment, null otherwise. + */ + findExtraFieldUnicodeComment: function() { + var ucommentField = this.extraFields[0x6375]; + if (ucommentField) { + var extraReader = readerFor(ucommentField.value); + + // wrong version + if (extraReader.readInt(1) !== 1) { + return null; + } + + // the crc of the comment changed, this field is out of date. + if (crc32fn(this.fileComment) !== extraReader.readInt(4)) { + return null; + } + + return utf8.utf8decode(extraReader.readData(ucommentField.length - 5)); + } + return null; + } +}; +module.exports = ZipEntry; + +},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(require,module,exports){ +'use strict'; + +var StreamHelper = require('./stream/StreamHelper'); +var DataWorker = require('./stream/DataWorker'); +var utf8 = require('./utf8'); +var CompressedObject = require('./compressedObject'); +var GenericWorker = require('./stream/GenericWorker'); + +/** + * A simple object representing a file in the zip file. + * @constructor + * @param {string} name the name of the file + * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data + * @param {Object} options the options of the file + */ +var ZipObject = function(name, data, options) { + this.name = name; + this.dir = options.dir; + this.date = options.date; + this.comment = options.comment; + this.unixPermissions = options.unixPermissions; + this.dosPermissions = options.dosPermissions; + + this._data = data; + this._dataBinary = options.binary; + // keep only the compression + this.options = { + compression : options.compression, + compressionOptions : options.compressionOptions + }; +}; + +ZipObject.prototype = { + /** + * Create an internal stream for the content of this object. + * @param {String} type the type of each chunk. + * @return StreamHelper the stream. + */ + internalStream: function (type) { + var result = null, outputType = "string"; + try { + if (!type) { + throw new Error("No output type specified."); + } + outputType = type.toLowerCase(); + var askUnicodeString = outputType === "string" || outputType === "text"; + if (outputType === "binarystring" || outputType === "text") { + outputType = "string"; + } + result = this._decompressWorker(); + + var isUnicodeString = !this._dataBinary; + + if (isUnicodeString && !askUnicodeString) { + result = result.pipe(new utf8.Utf8EncodeWorker()); + } + if (!isUnicodeString && askUnicodeString) { + result = result.pipe(new utf8.Utf8DecodeWorker()); + } + } catch (e) { + result = new GenericWorker("error"); + result.error(e); + } + + return new StreamHelper(result, outputType, ""); + }, + + /** + * Prepare the content in the asked type. + * @param {String} type the type of the result. + * @param {Function} onUpdate a function to call on each internal update. + * @return Promise the promise of the result. + */ + async: function (type, onUpdate) { + return this.internalStream(type).accumulate(onUpdate); + }, + + /** + * Prepare the content as a nodejs stream. + * @param {String} type the type of each chunk. + * @param {Function} onUpdate a function to call on each internal update. + * @return Stream the stream. + */ + nodeStream: function (type, onUpdate) { + return this.internalStream(type || "nodebuffer").toNodejsStream(onUpdate); + }, + + /** + * Return a worker for the compressed content. + * @private + * @param {Object} compression the compression object to use. + * @param {Object} compressionOptions the options to use when compressing. + * @return Worker the worker. + */ + _compressWorker: function (compression, compressionOptions) { + if ( + this._data instanceof CompressedObject && + this._data.compression.magic === compression.magic + ) { + return this._data.getCompressedWorker(); + } else { + var result = this._decompressWorker(); + if(!this._dataBinary) { + result = result.pipe(new utf8.Utf8EncodeWorker()); + } + return CompressedObject.createWorkerFrom(result, compression, compressionOptions); + } + }, + /** + * Return a worker for the decompressed content. + * @private + * @return Worker the worker. + */ + _decompressWorker : function () { + if (this._data instanceof CompressedObject) { + return this._data.getContentWorker(); + } else if (this._data instanceof GenericWorker) { + return this._data; + } else { + return new DataWorker(this._data); + } + } +}; + +var removedMethods = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"]; +var removedFn = function () { + throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); +}; + +for(var i = 0; i < removedMethods.length; i++) { + ZipObject.prototype[removedMethods[i]] = removedFn; +} +module.exports = ZipObject; + +},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(require,module,exports){ +(function (global){ +'use strict'; +var Mutation = global.MutationObserver || global.WebKitMutationObserver; + +var scheduleDrain; + +{ + if (Mutation) { + var called = 0; + var observer = new Mutation(nextTick); + var element = global.document.createTextNode(''); + observer.observe(element, { + characterData: true + }); + scheduleDrain = function () { + element.data = (called = ++called % 2); + }; + } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') { + var channel = new global.MessageChannel(); + channel.port1.onmessage = nextTick; + scheduleDrain = function () { + channel.port2.postMessage(0); + }; + } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) { + scheduleDrain = function () { + + // Create a + + + + + + + + + +
+ +
+ +
+
+ +

Interface Address

+
+
+
+ +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        fromKey

        +
        @Deprecated
        +static Address fromKey​(NetworkParameters params,
        +                       ECKey key,
        +                       ScriptType outputScriptType)
        + +
        Construct an Address that represents the public part of the given ECKey.
        +
        +
        Parameters:
        +
        params - network this address is valid for
        +
        key - only the public part is used
        +
        outputScriptType - script type the address should use
        +
        Returns:
        +
        constructed address
        +
        +
      • +
      + + + +
        +
      • +

        getParameters

        +
        @Deprecated
        +default NetworkParameters getParameters()
        +
        Deprecated. + +
        +
        +
        Returns:
        +
        network this data is valid for
        +
        +
      • +
      + + + +
        +
      • +

        getHash

        +
        byte[] getHash()
        +
        Get either the public key hash or script hash that is encoded in the address.
        +
        +
        Returns:
        +
        hash that is encoded in the address
        +
        +
      • +
      + + + +
        +
      • +

        getOutputScriptType

        +
        ScriptType getOutputScriptType()
        +
        Get the type of output script that will be used for sending to the address.
        +
        +
        Returns:
        +
        type of output script
        +
        +
      • +
      + + + +
        +
      • +

        compareTo

        +
        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 PARTIAL_ADDRESS_COMPARATOR for tests 1 and 2.

        +
        +
        Specified by:
        +
        compareTo in interface java.lang.Comparable<Address>
        +
        Parameters:
        +
        o - other Address object
        +
        Returns:
        +
        comparison result
        +
        +
      • +
      + + + + + + + +
        +
      • +

        compareTypes

        +
        static int compareTypes​(Address a,
        +                        Address b)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/AddressParser.AddressParserProvider.html b/javadoc/0.17-alpha3/org/bitcoinj/base/AddressParser.AddressParserProvider.html new file mode 100644 index 000000000..bec7f7bb5 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/AddressParser.AddressParserProvider.html @@ -0,0 +1,283 @@ + + + + + +AddressParser.AddressParserProvider (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface AddressParser.AddressParserProvider

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

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/base/AddressParser.html b/javadoc/0.17-alpha3/org/bitcoinj/base/AddressParser.html new file mode 100644 index 000000000..217ad4ccf --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/AddressParser.html @@ -0,0 +1,415 @@ + + + + + +AddressParser (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        parseAddress

        +
        Address parseAddress​(java.lang.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-alpha3/org/bitcoinj/base/Base58.html b/javadoc/0.17-alpha3/org/bitcoinj/base/Base58.html new file mode 100644 index 000000000..12f51e1ad --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/Base58.html @@ -0,0 +1,475 @@ + + + + + +Base58 (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Base58

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.base.Base58
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Base58
    +extends java.lang.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 TypeFieldDescription
      static char[]ALPHABET 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Base58() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static byte[]decode​(java.lang.String input) +
      Decodes the given base58 string into the original data bytes.
      +
      static byte[]decodeChecked​(java.lang.String input) +
      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 java.math.BigIntegerdecodeToBigInteger​(java.lang.String input) 
      static java.lang.Stringencode​(byte[] input) +
      Encodes the given bytes as a base58 string (no checksum is appended).
      +
      static java.lang.StringencodeChecked​(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 Detail

      + + + +
        +
      • +

        ALPHABET

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

      Constructor Detail

      + + + +
        +
      • +

        Base58

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

      Method Detail

      + + + +
        +
      • +

        encode

        +
        public static java.lang.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 java.lang.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​(java.lang.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        decodeChecked

        +
        public static byte[] decodeChecked​(java.lang.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-alpha3/org/bitcoinj/base/Bech32.Bech32Bytes.html b/javadoc/0.17-alpha3/org/bitcoinj/base/Bech32.Bech32Bytes.html new file mode 100644 index 000000000..2a8ca4e0a --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/Bech32.Bech32Bytes.html @@ -0,0 +1,362 @@ + + + + + +Bech32.Bech32Bytes (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Bech32.Bech32Bytes

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.lang.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 Summary

      + + + + + + + + + + + + +
      Constructors 
      ModifierConstructorDescription
      protected Bech32Bytes​(byte[] bytes) +
      Wrapper for a byte[] array.
      +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Bech32Bytes

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

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/base/Bech32.Bech32Data.html b/javadoc/0.17-alpha3/org/bitcoinj/base/Bech32.Bech32Data.html new file mode 100644 index 000000000..b146f7ebc --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/Bech32.Bech32Data.html @@ -0,0 +1,323 @@ + + + + + +Bech32.Bech32Data (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Bech32.Bech32Data

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + + + + + +
        +
      • +

        hrp

        +
        public final java.lang.String hrp
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/Bech32.Encoding.html b/javadoc/0.17-alpha3/org/bitcoinj/base/Bech32.Encoding.html new file mode 100644 index 000000000..875b00d3d --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/Bech32.Encoding.html @@ -0,0 +1,381 @@ + + + + + +Bech32.Encoding (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum Bech32.Encoding

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

      Enum Constant Summary

      + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      BECH32 
      BECH32M 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static Bech32.EncodingvalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static Bech32.Encoding[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static Bech32.Encoding[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (Bech32.Encoding c : Bech32.Encoding.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static Bech32.Encoding valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/Bech32.html b/javadoc/0.17-alpha3/org/bitcoinj/base/Bech32.html new file mode 100644 index 000000000..7d4924947 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/Bech32.html @@ -0,0 +1,480 @@ + + + + + +Bech32 (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Bech32

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.base.Bech32
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static class Bech32.Bech32Bytes +
      Binary data in 5-bits-per-byte format as used in Bech32 encoding/decoding.
      +
      static class Bech32.Bech32Data +
      Bech32 data in 5-bit byte format with Bech32.Encoding and human-readable part (HRP) information.
      +
      static class Bech32.Encoding +
      Enumeration of known Bech32 encoding format types: Bech32 and Bech32m.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Bech32() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static Bech32.Bech32Datadecode​(java.lang.String str) +
      Decode a Bech32 string.
      +
      static byte[]decodeBytes​(java.lang.String bech32, + java.lang.String expectedHrp, + Bech32.Encoding expectedEncoding) +
      Decode a Bech32 string to a byte array.
      +
      static java.lang.Stringencode​(Bech32.Bech32Data bech32) +
      Encode a Bech32 string.
      +
      static java.lang.Stringencode​(Bech32.Encoding encoding, + java.lang.String hrp, + Bech32.Bech32Bytes values) +
      Encode a Bech32 string.
      +
      static java.lang.StringencodeBytes​(Bech32.Encoding encoding, + java.lang.String hrp, + byte[] bytes) +
      Encode a byte array to a Bech32 string
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        Bech32

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

      Method Detail

      + + + +
        +
      • +

        encodeBytes

        +
        public static java.lang.String encodeBytes​(Bech32.Encoding encoding,
        +                                           java.lang.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​(java.lang.String bech32,
        +                                 java.lang.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 java.lang.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 java.lang.String encode​(Bech32.Encoding encoding,
        +                                      java.lang.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​(java.lang.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-alpha3/org/bitcoinj/base/BitcoinNetwork.html b/javadoc/0.17-alpha3/org/bitcoinj/base/BitcoinNetwork.html new file mode 100644 index 000000000..4c304a51a --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/BitcoinNetwork.html @@ -0,0 +1,856 @@ + + + + + +BitcoinNetwork (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum BitcoinNetwork

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<BitcoinNetwork>
    • +
    • +
        +
      • org.bitcoinj.base.BitcoinNetwork
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<BitcoinNetwork>, Network
    +
    +
    +
    public enum BitcoinNetwork
    +extends java.lang.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 Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      MAINNET +
      The main Bitcoin network, known as "mainnet", with id string "org.bitcoin.production"
      +
      REGTEST +
      A local Bitcoin regression test network, known as "regtest", with id string "org.bitcoin.regtest"
      +
      SIGNET +
      The Bitcoin signature-based test network, known as "signet", with id string "org.bitcoin.signet"
      +
      TESTNET +
      The Bitcoin test network, known as "testnet", with id string "org.bitcoin.test"
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      static java.lang.StringBITCOIN_SCHEME +
      Scheme part for Bitcoin URIs.
      +
      static java.lang.StringID_MAINNET +
      The ID string for the main, production network where people trade things.
      +
      static java.lang.StringID_REGTEST +
      The ID string for regtest mode.
      +
      static java.lang.StringID_SIGNET +
      The ID string for the signet.
      +
      static java.lang.StringID_TESTNET +
      The ID string for the testnet.
      +
      static CoinMAX_MONEY +
      The maximum money to be generated
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanexceedsMaxMoney​(Monetary amount) +
      Check if an amount exceeds the maximum allowed for a network (if the network has one)
      +
      static java.util.Optional<BitcoinNetwork>fromIdString​(java.lang.String idString) +
      Find the BitcoinNetwork from an ID String
      +
      static java.util.Optional<BitcoinNetwork>fromString​(java.lang.String nameString) +
      Find the BitcoinNetwork from a name string, e.g.
      +
      booleanhasMaxMoney() +
      Does this network have a fixed maximum number of coins
      +
      java.lang.Stringid() +
      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 +
      +
      intlegacyAddressHeader() +
      Header byte of base58 encoded legacy P2PKH addresses for this network.
      +
      intlegacyP2SHHeader() +
      Header byte of base58 encoded legacy P2SH addresses for this network.
      +
      CoinmaxMoney() +
      Maximum number of coins for this network as a Monetary value.
      +
      java.lang.StringsegwitAddressHrp() +
      Return the standard Bech32 SegwitAddress.SegwitHrp (as a String) for + this network.
      +
      java.lang.StringtoString() +
      Return the canonical, lowercase, user-facing String for an enum.
      +
      java.lang.StringuriScheme() +
      The URI scheme for Bitcoin.
      +
      static BitcoinNetworkvalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static BitcoinNetwork[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        BITCOIN_SCHEME

        +
        public static final java.lang.String BITCOIN_SCHEME
        +
        Scheme part for Bitcoin URIs.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        MAX_MONEY

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

        ID_MAINNET

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

        ID_TESTNET

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

        ID_SIGNET

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

        ID_REGTEST

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

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static BitcoinNetwork[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (BitcoinNetwork c : BitcoinNetwork.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static BitcoinNetwork valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.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 java.lang.Enum<BitcoinNetwork>
        +
        Returns:
        +
        canonical lowercase name for this Bitcoin network
        +
        +
      • +
      + + + +
        +
      • +

        id

        +
        public java.lang.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:
        +
        LegacyAddress.AddressHeader
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        LegacyAddress.P2SHHeader
        +
        +
      • +
      + + + +
        +
      • +

        segwitAddressHrp

        +
        public java.lang.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 java.lang.String uriScheme()
        +
        The URI scheme for Bitcoin.
        +
        +
        Specified by:
        +
        uriScheme in interface Network
        +
        Returns:
        +
        string containing the URI scheme
        +
        See Also:
        +
        BIP 0021
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        +
      • +
      + + + +
        +
      • +

        fromString

        +
        public static java.util.Optional<BitcoinNetwork> fromString​(java.lang.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 java.util.Optional<BitcoinNetwork> fromIdString​(java.lang.String idString)
        +
        Find the BitcoinNetwork from an ID String
        +
        +
        Parameters:
        +
        idString - specifies the network
        +
        Returns:
        +
        An Optional containing the matching enum or empty
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/Coin.html b/javadoc/0.17-alpha3/org/bitcoinj/base/Coin.html new file mode 100644 index 000000000..1b3a96013 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/Coin.html @@ -0,0 +1,1320 @@ + + + + + +Coin (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Coin

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.base.Coin
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.lang.Comparable<Coin>, Monetary
    +
    +
    +
    public final class Coin
    +extends java.lang.Object
    +implements Monetary, java.lang.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 TypeFieldDescription
      static intBYTES +
      Number of bytes to store this amount.
      +
      static CoinCENT +
      0.01 Bitcoins.
      +
      static CoinCOIN +
      One Bitcoin.
      +
      static CoinFIFTY_COINS 
      static CoinMICROCOIN +
      0.000001 Bitcoins, also known as 1 µBTC or 1 uBTC.
      +
      static CoinMILLICOIN +
      0.001 Bitcoins, also known as 1 mBTC.
      +
      static CoinNEGATIVE_SATOSHI +
      Represents a monetary value of minus one satoshi.
      +
      static CoinSATOSHI +
      A satoshi is the smallest unit that can be transferred.
      +
      static intSMALLEST_UNIT_EXPONENT +
      Number of decimals for one Bitcoin.
      +
      longvalue +
      The number of satoshis of this monetary value.
      +
      static CoinZERO +
      Zero Bitcoins.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      Coinadd​(Coin value) 
      static longbtcToSatoshi​(java.math.BigDecimal coins) +
      Convert a decimal amount of BTC into satoshis.
      +
      intcompareTo​(Coin other) 
      Coindiv​(int divisor) +
      Alias for divide
      +
      Coindiv​(long divisor) +
      Alias for divide
      +
      Coindivide​(long divisor) 
      longdivide​(Coin divisor) 
      Coin[]divideAndRemainder​(long divisor) 
      booleanequals​(java.lang.Object o) 
      longgetValue() +
      Returns the number of satoshis of this monetary value.
      +
      inthashCode() 
      booleanisGreaterThan​(Coin other) +
      Returns true if the monetary value represented by this instance is greater than that + of the given other Coin, otherwise false.
      +
      booleanisLessThan​(Coin other) +
      Returns true if the monetary value represented by this instance is less than that + of the given other Coin, otherwise false.
      +
      booleanisNegative() +
      Returns true if and only if this instance represents a monetary value less than zero, + otherwise false.
      +
      booleanisPositive() +
      Returns true if and only if this instance represents a monetary value greater than zero, + otherwise false.
      +
      booleanisZero() +
      Returns true if and only if this instance represents zero monetary value, + otherwise false.
      +
      longlongValue() +
      Returns the number of satoshis of this monetary value.
      +
      Coinminus​(Coin value) +
      Alias for subtract
      +
      Coinmultiply​(long factor) 
      Coinnegate() 
      static CoinofBtc​(java.math.BigDecimal coins) +
      Create a Coin from a decimal amount of BTC.
      +
      static CoinofSat​(long satoshis) +
      Create a Coin from a long integer number of satoshis.
      +
      static CoinparseCoin​(java.lang.String str) +
      Create a Coin by parsing a String amount expressed in "the way humans are used to".
      +
      static CoinparseCoinInexact​(java.lang.String str) +
      Create a Coin by parsing a String amount expressed in "the way humans are used to".
      +
      Coinplus​(Coin value) +
      Alias for add
      +
      static Coinread​(java.nio.ByteBuffer buf) +
      Read a Coin amount from the given buffer as 8 bytes in little-endian order.
      +
      static java.math.BigDecimalsatoshiToBtc​(long satoshis) +
      Convert an amount in satoshis to an amount in BTC.
      +
      byte[]serialize() +
      Allocates a byte array and serializes the amount.
      +
      CoinshiftLeft​(int n) 
      CoinshiftRight​(int n) 
      intsignum() 
      intsmallestUnitExponent() +
      Returns the absolute value of exponent of the value of a "smallest unit" in scientific notation.
      +
      Coinsubtract​(Coin value) 
      Cointimes​(int factor) +
      Alias for multiply
      +
      Cointimes​(long factor) +
      Alias for multiply
      +
      java.math.BigDecimaltoBtc() +
      Convert to number of bitcoin (in BTC)
      +
      java.lang.StringtoFriendlyString() +
      Returns the value as a 0.12 type string.
      +
      java.lang.StringtoPlainString() +
      + Returns the value as a plain string denominated in BTC.
      +
      longtoSat() +
      Convert to number of satoshis
      +
      java.lang.StringtoString() 
      static CoinvalueOf​(int coins, + int cents) +
      Create a Coin from an amount expressed in "the way humans are used to".
      +
      static CoinvalueOf​(long satoshis) +
      Create a Coin from a long integer number of satoshis.
      +
      java.nio.ByteBufferwrite​(java.nio.ByteBuffer buf) +
      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 Detail

      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        value

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

      Method Detail

      + + + +
        +
      • +

        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​(java.nio.ByteBuffer buf)
        +                 throws java.nio.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:
        +
        java.nio.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​(java.math.BigDecimal coins)
        +                         throws java.lang.ArithmeticException
        +
        Convert a decimal amount of BTC into satoshis.
        +
        +
        Parameters:
        +
        coins - number of coins
        +
        Returns:
        +
        number of satoshis
        +
        Throws:
        +
        java.lang.ArithmeticException - if value has too much precision or will not fit in a long
        +
        +
      • +
      + + + +
        +
      • +

        satoshiToBtc

        +
        public static java.math.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​(java.math.BigDecimal coins)
        +                  throws java.lang.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:
        +
        java.lang.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​(java.lang.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:
        +
        java.lang.IllegalArgumentException - if you try to specify fractional satoshis, or a value out of range.
        +
        +
      • +
      + + + +
        +
      • +

        parseCoinInexact

        +
        public static Coin parseCoinInexact​(java.lang.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:
        +
        java.lang.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 java.math.BigDecimal toBtc()
        +
        Convert to number of bitcoin (in BTC)
        +
        +
        Returns:
        +
        decimal number of bitcoin (in BTC)
        +
        +
      • +
      + + + +
        +
      • +

        write

        +
        public java.nio.ByteBuffer write​(java.nio.ByteBuffer buf)
        +                          throws java.nio.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:
        +
        java.nio.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 java.lang.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 java.lang.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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        compareTo

        +
        public int compareTo​(Coin other)
        +
        +
        Specified by:
        +
        compareTo in interface java.lang.Comparable<Coin>
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/LegacyAddress.AddressHeader.html b/javadoc/0.17-alpha3/org/bitcoinj/base/LegacyAddress.AddressHeader.html new file mode 100644 index 000000000..49ae86f77 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/LegacyAddress.AddressHeader.html @@ -0,0 +1,428 @@ + + + + + +LegacyAddress.AddressHeader (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum LegacyAddress.AddressHeader

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static LegacyAddress.AddressHeader[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (LegacyAddress.AddressHeader c : LegacyAddress.AddressHeader.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static LegacyAddress.AddressHeader valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + + + + + +
        +
      • +

        headerByte

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

Enum LegacyAddress.P2SHHeader

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

      Enum Constant Summary

      + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      X196 
      X5 
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static LegacyAddress.P2SHHeader[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (LegacyAddress.P2SHHeader c : LegacyAddress.P2SHHeader.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static LegacyAddress.P2SHHeader valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + + + + + +
        +
      • +

        headerByte

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

Class LegacyAddress

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.base.LegacyAddress
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.lang.Comparable<Address>, Address
    +
    +
    +
    public class LegacyAddress
    +extends java.lang.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 NetworkParameters, 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 Detail

      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        network

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

        bytes

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

        p2sh

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

      Method Detail

      + + + + + + + +
        +
      • +

        fromPubKeyHash

        +
        public static LegacyAddress fromPubKeyHash​(Network network,
        +                                           byte[] hash160)
        +                                    throws AddressFormatException
        +
        Construct a LegacyAddress that represents the given pubkey hash. The resulting address will be a P2PKH type of + address.
        +
        +
        Parameters:
        +
        network - network this address is valid for
        +
        hash160 - 20-byte pubkey hash
        +
        Returns:
        +
        constructed address
        +
        Throws:
        +
        AddressFormatException
        +
        +
      • +
      + + + +
        +
      • +

        fromKey

        +
        @Deprecated
        +public static LegacyAddress fromKey​(NetworkParameters params,
        +                                    ECKey key)
        + +
        Construct a LegacyAddress 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.
        +
        +
      • +
      + + + +
        +
      • +

        getVersion

        +
        public int getVersion()
        +
        Get the version header of an address. This is the first byte of a base58 encoded address.
        +
        +
        Returns:
        +
        version header as one byte
        +
        +
      • +
      + + + +
        +
      • +

        toBase58

        +
        public java.lang.String toBase58()
        +
        Returns the base58-encoded textual form, including version and checksum bytes.
        +
        +
        Returns:
        +
        textual form
        +
        +
      • +
      + + + +
        +
      • +

        getHash

        +
        public byte[] getHash()
        +
        The (big endian) 20 byte hash that is the core of a Bitcoin address.
        +
        +
        Specified by:
        +
        getHash in interface Address
        +
        Returns:
        +
        hash that is encoded in the address
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getParametersFromAddress

        +
        @Deprecated
        +public static NetworkParameters getParametersFromAddress​(java.lang.String address)
        +                                                  throws AddressFormatException
        +
        Deprecated.
        +
        Given an address, examines the version byte and attempts to find a matching NetworkParameters. If you aren't sure + which network the address is intended for (eg, it was provided by a user), you can use this to decide if it is + compatible with the current wallet.
        +
        +
        Returns:
        +
        network the address is valid for
        +
        Throws:
        +
        AddressFormatException - if the given base58 doesn't parse or the checksum is invalid
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        toString

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

        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 java.lang.Comparable<Address>
        +
        Parameters:
        +
        o - other Address object
        +
        Returns:
        +
        comparison result
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/Monetary.html b/javadoc/0.17-alpha3/org/bitcoinj/base/Monetary.html new file mode 100644 index 000000000..18f03bc8d --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/Monetary.html @@ -0,0 +1,288 @@ + + + + + +Monetary (bitcoinj-core 0.17-SNAPSHOT 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

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      longgetValue() +
      Returns the number of "smallest units" of this monetary value.
      +
      intsignum() 
      intsmallestUnitExponent() +
      Returns the absolute value of exponent of the value of a "smallest unit" in scientific notation.
      +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/base/Network.html b/javadoc/0.17-alpha3/org/bitcoinj/base/Network.html new file mode 100644 index 000000000..ff5aff016 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/Network.html @@ -0,0 +1,414 @@ + + + + + +Network (bitcoinj-core 0.17-SNAPSHOT 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

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      booleanexceedsMaxMoney​(Monetary monetary) +
      Check if an amount exceeds the maximum allowed for a network (if the network has one)
      +
      booleanhasMaxMoney() +
      Does this network have a fixed maximum number of coins
      +
      java.lang.Stringid() +
      The dot-seperated string id for this network.
      +
      intlegacyAddressHeader() +
      Header byte of base58 encoded legacy P2PKH addresses for this network.
      +
      intlegacyP2SHHeader() +
      Header byte of base58 encoded legacy P2SH addresses for this network.
      +
      MonetarymaxMoney() +
      Maximum number of coins for this network as a Monetary value.
      +
      java.lang.StringsegwitAddressHrp() +
      Human-readable part (HRP) of bech32 encoded segwit addresses for this network.
      +
      java.lang.StringuriScheme() +
      The URI scheme for this network.
      +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        id

        +
        java.lang.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:
        +
        LegacyAddress.AddressHeader
        +
        +
      • +
      + + + +
        +
      • +

        legacyP2SHHeader

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

        segwitAddressHrp

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

        uriScheme

        +
        java.lang.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-alpha3/org/bitcoinj/base/ScriptType.html b/javadoc/0.17-alpha3/org/bitcoinj/base/ScriptType.html new file mode 100644 index 000000000..e7074e197 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/ScriptType.html @@ -0,0 +1,590 @@ + + + + + +ScriptType (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum ScriptType

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<ScriptType>
    • +
    • +
        +
      • org.bitcoinj.base.ScriptType
      • +
      +
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      P2PK 
      P2PKH 
      P2SH 
      P2TR 
      P2WPKH 
      P2WSH 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      intid +
      Deprecated. +
      Use numericId() or better yet use id() to get a script identifier string
      +
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      static java.util.Optional<ScriptType>find​(java.lang.String id) +
      Use this method to create a ScriptType from a script identifier string that should be + validated.
      +
      java.lang.Stringid() +
      Return the script identifier string for this ScriptType.
      +
      intnumericId() +
      Deprecated. +
      Using id() to get a script identifier string is preferred.
      +
      +
      static ScriptTypeof​(java.lang.String id) +
      Use this method to create a ScriptType from a known good script identifier string.
      +
      static ScriptTypevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static ScriptType[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        id

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

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static ScriptType[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (ScriptType c : ScriptType.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static ScriptType valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        of

        +
        public static ScriptType of​(java.lang.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:
        +
        java.lang.IllegalArgumentException - if unknown/invalid script identifier string
        +
        +
      • +
      + + + +
        +
      • +

        find

        +
        public static java.util.Optional<ScriptType> find​(java.lang.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 java.lang.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-alpha3/org/bitcoinj/base/SegwitAddress.SegwitHrp.html b/javadoc/0.17-alpha3/org/bitcoinj/base/SegwitAddress.SegwitHrp.html new file mode 100644 index 000000000..7764fa4b6 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/SegwitAddress.SegwitHrp.html @@ -0,0 +1,482 @@ + + + + + +SegwitAddress.SegwitHrp (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum SegwitAddress.SegwitHrp

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static SegwitAddress.SegwitHrp[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (SegwitAddress.SegwitHrp c : SegwitAddress.SegwitHrp.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static SegwitAddress.SegwitHrp valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        toString

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

        of

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

        find

        +
        public static java.util.Optional<SegwitAddress.SegwitHrp> find​(java.lang.String hrp)
        +
        +
        Parameters:
        +
        hrp - uppercase or lowercase HRP
        +
        Returns:
        +
        Optional containing the corresponding enum or empty if not found
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/SegwitAddress.html b/javadoc/0.17-alpha3/org/bitcoinj/base/SegwitAddress.html new file mode 100644 index 000000000..06a153240 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/SegwitAddress.html @@ -0,0 +1,924 @@ + + + + + +SegwitAddress (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class SegwitAddress

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.base.SegwitAddress
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        WITNESS_PROGRAM_LENGTH_PKH

        +
        public static final int WITNESS_PROGRAM_LENGTH_PKH
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        WITNESS_PROGRAM_LENGTH_SH

        +
        public static final int WITNESS_PROGRAM_LENGTH_SH
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        WITNESS_PROGRAM_LENGTH_TR

        +
        public static final int WITNESS_PROGRAM_LENGTH_TR
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        WITNESS_PROGRAM_MIN_LENGTH

        +
        public static final int WITNESS_PROGRAM_MIN_LENGTH
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        WITNESS_PROGRAM_MAX_LENGTH

        +
        public static final int WITNESS_PROGRAM_MAX_LENGTH
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        network

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

        witnessVersion

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

        witnessProgram

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

      Method Detail

      + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        toString

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

        fromBech32

        +
        @Deprecated
        +public static SegwitAddress fromBech32​(@Nullable
        +                                       NetworkParameters params,
        +                                       java.lang.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​(java.lang.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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 java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toBech32

        +
        public java.lang.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 java.lang.Comparable<Address>
        +
        Parameters:
        +
        o - other Address object
        +
        Returns:
        +
        comparison result
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/Sha256Hash.html b/javadoc/0.17-alpha3/org/bitcoinj/base/Sha256Hash.html new file mode 100644 index 000000000..c51de423b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/Sha256Hash.html @@ -0,0 +1,881 @@ + + + + + +Sha256Hash (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Sha256Hash

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.base.Sha256Hash
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.lang.Comparable<Sha256Hash>
    +
    +
    +
    public class Sha256Hash
    +extends java.lang.Object
    +implements java.lang.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 TypeFieldDescription
      static intLENGTH 
      static Sha256HashZERO_HASH 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      intcompareTo​(Sha256Hash other) 
      booleanequals​(java.lang.Object o) 
      byte[]getBytes() +
      Returns the internal byte array, without defensively copying.
      +
      byte[]getReversedBytes() +
      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.
      +
      inthashCode() +
      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.
      +
      static java.security.MessageDigestnewDigest() +
      Returns a new SHA-256 MessageDigest instance.
      +
      static Sha256Hashof​(byte[] contents) +
      Creates a new instance containing the calculated (one-time) hash of the given bytes.
      +
      static Sha256Hashof​(java.io.File file) +
      Creates a new instance containing the calculated (one-time) hash of the given file's contents.
      +
      static Sha256Hashread​(java.nio.ByteBuffer buf) +
      Create a new instance by reading from the given buffer.
      +
      byte[]serialize() +
      Allocates a byte array and writes the hash into it, in reversed order.
      +
      java.math.BigIntegertoBigInteger() +
      Returns the bytes interpreted as a positive integer.
      +
      java.lang.StringtoString() 
      static Sha256HashtwiceOf​(byte[] contents) +
      Creates a new instance containing the hash of the calculated hash of the given bytes.
      +
      static Sha256HashtwiceOf​(byte[] content1, + byte[] content2) +
      Creates a new instance containing the hash of the calculated hash of the given bytes.
      +
      static Sha256Hashwrap​(byte[] rawHashBytes) +
      Creates a new instance that wraps the given hash value.
      +
      static Sha256Hashwrap​(java.lang.String hexString) +
      Creates a new instance that wraps the given hash value (represented as a hex string).
      +
      static Sha256HashwrapReversed​(byte[] rawHashBytes) +
      Creates a new instance that wraps the given hash value, but with byte order reversed.
      +
      java.nio.ByteBufferwrite​(java.nio.ByteBuffer buf) +
      Write hash into the given buffer.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Method Detail

      + + + +
        +
      • +

        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:
        +
        java.lang.IllegalArgumentException - if the given array length is not exactly 32
        +
        +
      • +
      + + + +
        +
      • +

        wrap

        +
        public static Sha256Hash wrap​(java.lang.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:
        +
        java.lang.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:
        +
        java.lang.IllegalArgumentException - if the given array length is not exactly 32
        +
        +
      • +
      + + + +
        +
      • +

        read

        +
        public static Sha256Hash read​(java.nio.ByteBuffer buf)
        +                       throws java.nio.BufferUnderflowException
        +
        Create a new instance by reading from the given buffer.
        +
        +
        Parameters:
        +
        buf - buffer to read from
        +
        Returns:
        +
        a new instance
        +
        Throws:
        +
        java.nio.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​(java.io.File file)
        +                     throws java.io.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:
        +
        java.io.IOException - if an error occurs while reading the file
        +
        +
      • +
      + + + +
        +
      • +

        newDigest

        +
        public static java.security.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​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.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 java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

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

        toBigInteger

        +
        public java.math.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 java.nio.ByteBuffer write​(java.nio.ByteBuffer buf)
        +                          throws java.nio.BufferOverflowException
        +
        Write hash into the given buffer.
        +
        +
        Parameters:
        +
        buf - buffer to write into
        +
        Returns:
        +
        the buffer
        +
        Throws:
        +
        java.nio.BufferOverflowException - if the hash doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        compareTo

        +
        public int compareTo​(Sha256Hash other)
        +
        +
        Specified by:
        +
        compareTo in interface java.lang.Comparable<Sha256Hash>
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/VarInt.html b/javadoc/0.17-alpha3/org/bitcoinj/base/VarInt.html new file mode 100644 index 000000000..502e2d125 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/VarInt.html @@ -0,0 +1,621 @@ + + + + + +VarInt (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class VarInt

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

      Constructor Summary

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

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      booleanfitsInt() +
      Determine if the value would fit an int, i.e.
      +
      intgetOriginalSizeInBytes() +
      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.
      +
      intgetSizeInBytes() +
      Returns the minimum encoded size of the value.
      +
      inthashCode() 
      intintValue() +
      Gets the value as an unsigned int in the range of 0 to Integer.MAX_VALUE.
      +
      longlongValue() +
      Gets the value as a long.
      +
      static VarIntof​(long value) +
      Constructs a new VarInt with the given unsigned long value.
      +
      static VarIntofBytes​(byte[] buf, + int offset) +
      Constructs a new VarInt with the value parsed from the specified offset of the given buffer.
      +
      static VarIntread​(java.nio.ByteBuffer buf) +
      Constructs a new VarInt by reading from the given buffer.
      +
      byte[]serialize() +
      Allocates a byte array and serializes the value into its minimal representation.
      +
      static intsizeOf​(long value) +
      Returns the minimum encoded size of the given unsigned long value.
      +
      java.lang.StringtoString() 
      java.nio.ByteBufferwrite​(java.nio.ByteBuffer buf) +
      Write encoded value into the given buffer.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        VarInt

        +
        @Deprecated
        +public VarInt​(long value)
        +
        Deprecated. + +
        +
      • +
      + + + +
        +
      • +

        VarInt

        +
        @Deprecated
        +public VarInt​(byte[] buf,
        +              int offset)
        +
        Deprecated. + +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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 java.lang.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:
        +
        java.lang.ArrayIndexOutOfBoundsException - if offset points outside of the buffer, or + if the value doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        read

        +
        public static VarInt read​(java.nio.ByteBuffer buf)
        +                   throws java.nio.BufferUnderflowException
        +
        Constructs a new VarInt by reading from the given buffer.
        +
        +
        Parameters:
        +
        buf - buffer to read from
        +
        Throws:
        +
        java.nio.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 java.lang.ArithmeticException
        +
        Gets the value as an unsigned int in the range of 0 to Integer.MAX_VALUE.
        +
        +
        Returns:
        +
        value as an unsigned int
        +
        Throws:
        +
        java.lang.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 java.nio.ByteBuffer write​(java.nio.ByteBuffer buf)
        +                          throws java.nio.BufferOverflowException
        +
        Write encoded value into the given buffer.
        +
        +
        Parameters:
        +
        buf - buffer to write into
        +
        Returns:
        +
        the buffer
        +
        Throws:
        +
        java.nio.BufferOverflowException - if the value doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        toString

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

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

Class AddressFormatException.InvalidCharacter

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        character

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

        position

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

      Constructor Detail

      + + + +
        +
      • +

        InvalidCharacter

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

Class AddressFormatException.InvalidChecksum

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InvalidChecksum

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

        InvalidChecksum

        +
        public InvalidChecksum​(java.lang.String message)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.InvalidDataLength.html b/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.InvalidDataLength.html new file mode 100644 index 000000000..0dd39ee31 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.InvalidDataLength.html @@ -0,0 +1,343 @@ + + + + + +AddressFormatException.InvalidDataLength (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class AddressFormatException.InvalidDataLength

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InvalidDataLength

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

        InvalidDataLength

        +
        public InvalidDataLength​(java.lang.String message)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.InvalidPrefix.html b/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.InvalidPrefix.html new file mode 100644 index 000000000..cb2db6793 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.InvalidPrefix.html @@ -0,0 +1,347 @@ + + + + + +AddressFormatException.InvalidPrefix (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class AddressFormatException.InvalidPrefix

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InvalidPrefix

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

        InvalidPrefix

        +
        public InvalidPrefix​(java.lang.String message)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.UnexpectedWitnessVersion.html b/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.UnexpectedWitnessVersion.html new file mode 100644 index 000000000..cf9ce4f4b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.UnexpectedWitnessVersion.html @@ -0,0 +1,342 @@ + + + + + +AddressFormatException.UnexpectedWitnessVersion (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class AddressFormatException.UnexpectedWitnessVersion

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        UnexpectedWitnessVersion

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

        UnexpectedWitnessVersion

        +
        public UnexpectedWitnessVersion​(java.lang.String message)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.WrongNetwork.html b/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.WrongNetwork.html new file mode 100644 index 000000000..948acedf0 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.WrongNetwork.html @@ -0,0 +1,349 @@ + + + + + +AddressFormatException.WrongNetwork (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class AddressFormatException.WrongNetwork

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        WrongNetwork

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

        WrongNetwork

        +
        public WrongNetwork​(java.lang.String hrp)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.html b/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.html new file mode 100644 index 000000000..d00f3a8ef --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/AddressFormatException.html @@ -0,0 +1,385 @@ + + + + + +AddressFormatException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class AddressFormatException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • java.lang.RuntimeException
        • +
        • +
            +
          • java.lang.IllegalArgumentException
          • +
          • +
              +
            • org.bitcoinj.base.exceptions.AddressFormatException
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static class AddressFormatException.InvalidCharacter +
      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.
      +
      static class AddressFormatException.InvalidChecksum +
      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.
      +
      static class AddressFormatException.InvalidDataLength +
      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.
      +
      static class AddressFormatException.InvalidPrefix +
      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).
      +
      static class AddressFormatException.UnexpectedWitnessVersion +
      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.
      +
      static class AddressFormatException.WrongNetwork +
      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).
      +
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        AddressFormatException

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

        AddressFormatException

        +
        public AddressFormatException​(java.lang.String message)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/package-summary.html new file mode 100644 index 000000000..59a1cf4c4 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/exceptions/package-summary.html @@ -0,0 +1,207 @@ + + + + + +org.bitcoinj.base.exceptions (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.base.exceptions

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

Hierarchy For Package org.bitcoinj.base.exceptions

+Package Hierarchies: + +
+
+
+

Class Hierarchy

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

Class Buffers

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

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Buffers() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static byte[]readBytes​(java.nio.ByteBuffer buf, + int length) +
      Read given number of bytes from the buffer.
      +
      static byte[]readLengthPrefixedBytes​(java.nio.ByteBuffer buf) +
      First read a VarInt from the buffer and use it to determine the number of bytes to be read.
      +
      static java.lang.StringreadLengthPrefixedString​(java.nio.ByteBuffer buf) +
      First read a VarInt from the buffer and use it to determine the number of bytes to read.
      +
      static java.nio.ByteBufferskipBytes​(java.nio.ByteBuffer buf, + int numBytes) +
      Advance buffer position by a given number of bytes.
      +
      static java.nio.ByteBufferwriteLengthPrefixedBytes​(java.nio.ByteBuffer buf, + byte[] bytes) +
      First write the length of the byte array as a VarInt.
      +
      static java.nio.ByteBufferwriteLengthPrefixedString​(java.nio.ByteBuffer buf, + java.lang.String str) +
      Encode a given string using UTF-8.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        Buffers

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

      Method Detail

      + + + +
        +
      • +

        readBytes

        +
        public static byte[] readBytes​(java.nio.ByteBuffer buf,
        +                               int length)
        +                        throws java.nio.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:
        +
        java.nio.BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
        +
        +
      • +
      + + + +
        +
      • +

        readLengthPrefixedBytes

        +
        public static byte[] readLengthPrefixedBytes​(java.nio.ByteBuffer buf)
        +                                      throws java.nio.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:
        +
        java.nio.BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
        +
        +
      • +
      + + + +
        +
      • +

        writeLengthPrefixedBytes

        +
        public static java.nio.ByteBuffer writeLengthPrefixedBytes​(java.nio.ByteBuffer buf,
        +                                                           byte[] bytes)
        +                                                    throws java.nio.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:
        +
        java.nio.BufferOverflowException - if the value doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        readLengthPrefixedString

        +
        public static java.lang.String readLengthPrefixedString​(java.nio.ByteBuffer buf)
        +                                                 throws java.nio.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:
        +
        java.nio.BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
        +
        +
      • +
      + + + +
        +
      • +

        writeLengthPrefixedString

        +
        public static java.nio.ByteBuffer writeLengthPrefixedString​(java.nio.ByteBuffer buf,
        +                                                            java.lang.String str)
        +                                                     throws java.nio.BufferOverflowException
        +
        Encode a given string using UTF-8. Then write the lnegth 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:
        +
        java.nio.BufferOverflowException - if the value doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        skipBytes

        +
        public static java.nio.ByteBuffer skipBytes​(java.nio.ByteBuffer buf,
        +                                            int numBytes)
        +                                     throws java.nio.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:
        +
        java.nio.BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/internal/ByteArray.html b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/ByteArray.html new file mode 100644 index 000000000..fb057a090 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/ByteArray.html @@ -0,0 +1,445 @@ + + + + + +ByteArray (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ByteArray

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

      Field Summary

      + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      protected byte[]bytes 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      ByteArray​(byte[] bytes) +
      Wrapper for a byte[]
      +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        bytes

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

      Constructor Detail

      + + + +
        +
      • +

        ByteArray

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

      Method Detail

      + + + +
        +
      • +

        bytes

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

        formatHex

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

        hashCode

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

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.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 java.lang.Comparable<ByteArray>
        +
        Parameters:
        +
        o -
        +
        Returns:
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/internal/ByteUtils.html b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/ByteUtils.html new file mode 100644 index 000000000..2d57e0ba8 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/ByteUtils.html @@ -0,0 +1,1648 @@ + + + + + +ByteUtils (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ByteUtils

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.base.internal.ByteUtils
    • +
    +
  • +
+
+
    +
  • +
    +
    public class ByteUtils
    +extends java.lang.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 TypeFieldDescription
      static com.google.common.io.BaseEncodingHEX +
      Deprecated. +
      Use hexFormat or parseHex(String) or other available + options.
      +
      +
      static longMAX_UNSIGNED_INTEGER +
      Maximum unsigned value that can be expressed by 32 bits.
      +
      static intMAX_UNSIGNED_SHORT +
      Maximum unsigned value that can be expressed by 16 bits.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      ByteUtils() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static java.util.Comparator<byte[]>arrayUnsignedComparator() +
      Provides a byte array comparator.
      +
      static byte[]bigIntegerToBytes​(java.math.BigInteger b, + int numBytes) +
      + The regular BigInteger.toByteArray() includes the sign bit of the number and + might result in an extra byte addition.
      +
      static java.math.BigIntegerbytesToBigInteger​(byte[] bytes) +
      Converts an array of bytes into a positive BigInteger.
      +
      static booleancheckBitLE​(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) +
      Concatentate two byte arrays
      +
      static java.math.BigIntegerdecodeCompactBits​(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 java.math.BigIntegerdecodeMPI​(byte[] mpi, + boolean hasLength) +
      MPI encoded numbers are produced by the OpenSSL BN_bn2mpi function.
      +
      static longencodeCompactBits​(java.math.BigInteger value) 
      static byte[]encodeMPI​(java.math.BigInteger value, + boolean includeLength) +
      MPI encoded numbers are produced by the OpenSSL BN_bn2mpi function.
      +
      static java.lang.StringformatHex​(byte[] bytes) 
      static byte[]parseHex​(java.lang.String string) 
      static intreadInt32​(java.nio.ByteBuffer buf) +
      Read 4 bytes from the byte array (starting at the offset) as signed 32-bit integer in little endian format.
      +
      static longreadInt64​(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 longreadInt64​(java.nio.ByteBuffer buf) +
      Read 8 bytes from the buffer as signed 64-bit integer in little endian format.
      +
      static intreadUint16​(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 intreadUint16​(java.io.InputStream is) +
      Read 2 bytes from the stream as unsigned 16-bit integer in little endian format.
      +
      static intreadUint16​(java.nio.ByteBuffer buf) +
      Read 2 bytes from the buffer as unsigned 16-bit integer in little endian format.
      +
      static intreadUint16BE​(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 intreadUint16BE​(java.nio.ByteBuffer buf) +
      Read 2 bytes from the buffer as unsigned 16-bit integer in big endian format.
      +
      static longreadUint32​(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 longreadUint32​(java.io.InputStream is) +
      Read 4 bytes from the stream as unsigned 32-bit integer in little endian format.
      +
      static longreadUint32​(java.nio.ByteBuffer buf) +
      Read 4 bytes from the buffer as unsigned 32-bit integer in little endian format.
      +
      static longreadUint32BE​(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 longreadUint32BE​(java.nio.ByteBuffer buf) +
      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 voidsetBitLE​(byte[] data, + int index) +
      Sets the given bit in data to one, using little endian (not the same as Java native big endian)
      +
      static voidwriteInt16BE​(int val, + byte[] out, + int offset) +
      Write a 16-bit integer to a given byte array in big-endian format, starting at a given offset.
      +
      static voidwriteInt16BE​(int val, + java.io.OutputStream stream) +
      Write a 16-bit integer to a given output stream in big-endian format.
      +
      static java.nio.ByteBufferwriteInt16BE​(int val, + java.nio.ByteBuffer buf) +
      Write a 16-bit integer to a given buffer in big-endian format.
      +
      static voidwriteInt16LE​(int val, + byte[] out, + int offset) +
      Write a 16-bit integer to a given byte array in little-endian format, starting at a given offset.
      +
      static voidwriteInt16LE​(int val, + java.io.OutputStream stream) +
      Write a 16-bit integer to a given output stream in little-endian format.
      +
      static java.nio.ByteBufferwriteInt16LE​(int val, + java.nio.ByteBuffer buf) +
      Write a 16-bit integer to a given buffer in little-endian format.
      +
      static voidwriteInt32BE​(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 voidwriteInt32BE​(int val, + java.io.OutputStream stream) +
      Write a 32-bit integer to a given output stream in big-endian format.
      +
      static java.nio.ByteBufferwriteInt32BE​(int val, + java.nio.ByteBuffer buf) +
      Write a 32-bit integer to a given buffer in big-endian format.
      +
      static voidwriteInt32BE​(long 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 voidwriteInt32BE​(long val, + java.io.OutputStream stream) +
      Write a 32-bit integer to a given output stream in big-endian format.
      +
      static java.nio.ByteBufferwriteInt32BE​(long val, + java.nio.ByteBuffer buf) +
      Write a 32-bit integer to a given buffer in big-endian format.
      +
      static voidwriteInt32LE​(int val, + java.io.OutputStream stream) +
      Write a 32-bit integer to a given output stream in little-endian format.
      +
      static java.nio.ByteBufferwriteInt32LE​(int val, + java.nio.ByteBuffer buf) +
      Write a 32-bit integer to a given buffer in little-endian format.
      +
      static voidwriteInt32LE​(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 voidwriteInt32LE​(long val, + java.io.OutputStream stream) +
      Write a 32-bit integer to a given output stream in little-endian format.
      +
      static java.nio.ByteBufferwriteInt32LE​(long val, + java.nio.ByteBuffer buf) +
      Write a 32-bit integer to a given buffer in little-endian format.
      +
      static voidwriteInt64LE​(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 voidwriteInt64LE​(long val, + java.io.OutputStream stream) +
      Write a 64-bit integer to a given output stream in little-endian format.
      +
      static java.nio.ByteBufferwriteInt64LE​(long val, + java.nio.ByteBuffer buf) +
      Write a 64-bit integer to a given buffer in little-endian format.
      +
      static voidwriteInt64LE​(java.math.BigInteger val, + java.io.OutputStream stream) +
      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 Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        ByteUtils

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

      Method Detail

      + + + +
        +
      • +

        formatHex

        +
        public static java.lang.String formatHex​(byte[] bytes)
        +
      • +
      + + + +
        +
      • +

        parseHex

        +
        public static byte[] parseHex​(java.lang.String string)
        +
      • +
      + + + +
        +
      • +

        bigIntegerToBytes

        +
        public static byte[] bigIntegerToBytes​(java.math.BigInteger b,
        +                                       int numBytes)
        +

        + The regular BigInteger.toByteArray() includes the sign bit of the number and + might result in an extra byte addition. This method removes this extra byte. +

        +

        + Assuming only positive numbers, it's possible to discriminate if an extra byte + is added by checking if the first element of the array is 0 (0000_0000). + Due to the minimal representation provided by BigInteger, it means that the bit sign + is the least significant bit 0000_0000 . + Otherwise the representation is not minimal. + For example, if the sign bit is 0000_0000, then the representation is not minimal due to the rightmost zero. +

        + This is the antagonist to bytesToBigInteger(byte[]).
        +
        +
        Parameters:
        +
        b - the integer to format into a byte array
        +
        numBytes - the desired size of the resulting byte array
        +
        Returns:
        +
        numBytes byte long array.
        +
        +
      • +
      + + + +
        +
      • +

        bytesToBigInteger

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

        writeInt16LE

        +
        public static java.nio.ByteBuffer writeInt16LE​(int val,
        +                                               java.nio.ByteBuffer buf)
        +                                        throws java.nio.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:
        +
        java.nio.BufferOverflowException - if the value doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        writeInt16LE

        +
        public static void writeInt16LE​(int val,
        +                                byte[] out,
        +                                int offset)
        +                         throws java.lang.ArrayIndexOutOfBoundsException
        +
        Write a 16-bit integer to a given byte array in little-endian format, starting at a given offset. +

        + The value is expected as an unsigned int 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:
        +
        java.lang.ArrayIndexOutOfBoundsException - if offset points outside of the buffer, or + if the value doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        writeInt16BE

        +
        public static java.nio.ByteBuffer writeInt16BE​(int val,
        +                                               java.nio.ByteBuffer buf)
        +                                        throws java.nio.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:
        +
        java.nio.BufferOverflowException - if the value doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        writeInt16BE

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

        + The value is expected as an unsigned int 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:
        +
        java.lang.ArrayIndexOutOfBoundsException - if offset points outside of the buffer, or + if the value doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        writeInt32LE

        +
        public static java.nio.ByteBuffer writeInt32LE​(int val,
        +                                               java.nio.ByteBuffer buf)
        +                                        throws java.nio.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:
        +
        java.nio.BufferOverflowException - if the value doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        writeInt32LE

        +
        public static java.nio.ByteBuffer writeInt32LE​(long val,
        +                                               java.nio.ByteBuffer buf)
        +                                        throws java.nio.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:
        +
        java.nio.BufferOverflowException - if the value doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        writeInt32LE

        +
        public static void writeInt32LE​(long val,
        +                                byte[] out,
        +                                int offset)
        +                         throws java.lang.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:
        +
        java.lang.ArrayIndexOutOfBoundsException - if offset points outside of the buffer, or + if the value doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        writeInt32BE

        +
        public static java.nio.ByteBuffer writeInt32BE​(long val,
        +                                               java.nio.ByteBuffer buf)
        +                                        throws java.nio.BufferOverflowException
        +
        Write a 32-bit integer to a given buffer in big-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:
        +
        java.nio.BufferOverflowException - if the value doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        writeInt32BE

        +
        public static java.nio.ByteBuffer writeInt32BE​(int val,
        +                                               java.nio.ByteBuffer buf)
        +                                        throws java.nio.BufferOverflowException
        +
        Write a 32-bit integer to a given buffer in big-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 writeInt32BE(long, ByteBuffer).

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

        writeInt32BE

        +
        public static void writeInt32BE​(long val,
        +                                byte[] out,
        +                                int offset)
        +                         throws java.lang.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 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:
        +
        java.lang.ArrayIndexOutOfBoundsException - if offset points outside of the buffer, or + if the value doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        writeInt32BE

        +
        public static void writeInt32BE​(int val,
        +                                byte[] out,
        +                                int offset)
        +                         throws java.lang.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. If you've got an unsigned long as per the + Java Unsigned Integer API, use writeInt32BE(long, byte[], int).

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

        writeInt64LE

        +
        public static java.nio.ByteBuffer writeInt64LE​(long val,
        +                                               java.nio.ByteBuffer buf)
        +                                        throws java.nio.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:
        +
        java.nio.BufferOverflowException - if the value doesn't fit the remaining buffer
        +
        +
      • +
      + + + +
        +
      • +

        writeInt64LE

        +
        public static void writeInt64LE​(long val,
        +                                byte[] out,
        +                                int offset)
        +                         throws java.lang.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:
        +
        java.lang.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,
        +                                java.io.OutputStream stream)
        +                         throws java.io.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 - strean to be written into
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs
        +
        +
      • +
      + + + +
        +
      • +

        writeInt16BE

        +
        public static void writeInt16BE​(int val,
        +                                java.io.OutputStream stream)
        +                         throws java.io.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 - strean to be written into
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs
        +
        +
      • +
      + + + +
        +
      • +

        writeInt32LE

        +
        public static void writeInt32LE​(int val,
        +                                java.io.OutputStream stream)
        +                         throws java.io.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:
        +
        java.io.IOException - if an I/O error occurs
        +
        +
      • +
      + + + +
        +
      • +

        writeInt32LE

        +
        public static void writeInt32LE​(long val,
        +                                java.io.OutputStream stream)
        +                         throws java.io.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 - strean to be written into
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs
        +
        +
      • +
      + + + +
        +
      • +

        writeInt32BE

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

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

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

        writeInt32BE

        +
        public static void writeInt32BE​(int val,
        +                                java.io.OutputStream stream)
        +                         throws java.io.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 - strean to be written into
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs
        +
        +
      • +
      + + + +
        +
      • +

        writeInt64LE

        +
        public static void writeInt64LE​(long val,
        +                                java.io.OutputStream stream)
        +                         throws java.io.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 - strean to be written into
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs
        +
        +
      • +
      + + + +
        +
      • +

        writeInt64LE

        +
        public static void writeInt64LE​(java.math.BigInteger val,
        +                                java.io.OutputStream stream)
        +                         throws java.io.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 - strean to be written into
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs
        +
        +
      • +
      + + + +
        +
      • +

        readUint16

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

        readUint16

        +
        public static int readUint16​(byte[] bytes,
        +                             int offset)
        +                      throws java.lang.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:
        +
        java.lang.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​(java.nio.ByteBuffer buf)
        +                        throws java.nio.BufferUnderflowException
        +
        Read 2 bytes from the buffer as unsigned 16-bit integer in big endian format.
        +
        +
        Parameters:
        +
        buf - buffer to be read from
        +
        Throws:
        +
        java.nio.BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
        +
        +
      • +
      + + + +
        +
      • +

        readUint16BE

        +
        public static int readUint16BE​(byte[] bytes,
        +                               int offset)
        +                        throws java.lang.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:
        +
        java.lang.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​(java.nio.ByteBuffer buf)
        +                       throws java.nio.BufferUnderflowException
        +
        Read 4 bytes from the buffer as unsigned 32-bit integer in little endian format.
        +
        +
        Parameters:
        +
        buf - buffer to be read from
        +
        Throws:
        +
        java.nio.BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
        +
        +
      • +
      + + + +
        +
      • +

        readInt32

        +
        public static int readInt32​(java.nio.ByteBuffer buf)
        +                     throws java.nio.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:
        +
        java.nio.BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
        +
        +
      • +
      + + + +
        +
      • +

        readUint32

        +
        public static long readUint32​(byte[] bytes,
        +                              int offset)
        +                       throws java.lang.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:
        +
        java.lang.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​(java.nio.ByteBuffer buf)
        +                         throws java.nio.BufferUnderflowException
        +
        Read 4 bytes from the buffer as unsigned 32-bit integer in big endian format.
        +
        +
        Parameters:
        +
        buf - buffer to be read from
        +
        Throws:
        +
        java.nio.BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
        +
        +
      • +
      + + + +
        +
      • +

        readUint32BE

        +
        public static long readUint32BE​(byte[] bytes,
        +                                int offset)
        +                         throws java.lang.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:
        +
        java.lang.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​(java.nio.ByteBuffer buf)
        +                      throws java.nio.BufferUnderflowException
        +
        Read 8 bytes from the buffer as signed 64-bit integer in little endian format.
        +
        +
        Parameters:
        +
        buf - buffer to be read from
        +
        Throws:
        +
        java.nio.BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
        +
        +
      • +
      + + + +
        +
      • +

        readInt64

        +
        public static long readInt64​(byte[] bytes,
        +                             int offset)
        +                      throws java.lang.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:
        +
        java.lang.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​(java.io.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​(java.io.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 java.math.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​(java.math.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 java.math.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​(java.math.BigInteger value)
        +
        +
        See Also:
        +
        decodeCompactBits(long)
        +
        +
      • +
      + + + +
        +
      • +

        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 java.util.Comparator<byte[]> arrayUnsignedComparator()
        +
        Provides a byte array comparator.
        +
        +
        Returns:
        +
        A comparator for byte[]
        +
        +
      • +
      + + + +
        +
      • +

        concat

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

Interface FutureUtils.ThrowingSupplier<T>

+
+
+
+
    +
  • +
    +
    Type Parameters:
    +
    T - the supplied type
    +
    +
    +
    All Superinterfaces:
    +
    java.util.function.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 java.util.function.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 Detail

      + + + +
        +
      • +

        get

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

        getThrows

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

Class FutureUtils

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.base.internal.FutureUtils
    • +
    +
  • +
+
+
    +
  • +
    +
    public class FutureUtils
    +extends java.lang.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.

    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static interface FutureUtils.ThrowingSupplier<T> +
      Subinterface of Supplier for Lambdas which throw exceptions.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      FutureUtils() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static <T> java.util.concurrent.CompletableFuture<java.util.List<T>>allAsList​(java.util.List<? extends java.util.concurrent.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.
      +
      static <T> java.util.concurrent.CompletableFuture<T>failedFuture​(java.lang.Throwable t) +
      Can be replaced with CompletableFuture.failedFuture(Throwable) in Java 9+.
      +
      static <T> java.util.concurrent.CompletableFuture<java.util.List<T>>successfulAsList​(java.util.List<? extends java.util.concurrent.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.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        FutureUtils

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

      Method Detail

      + + + +
        +
      • +

        allAsList

        +
        public static <T> java.util.concurrent.CompletableFuture<java.util.List<T>> allAsList​(java.util.List<? extends java.util.concurrent.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> java.util.concurrent.CompletableFuture<java.util.List<T>> successfulAsList​(java.util.List<? extends java.util.concurrent.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> java.util.concurrent.CompletableFuture<T> failedFuture​(java.lang.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-alpha3/org/bitcoinj/base/internal/HexFormat.html b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/HexFormat.html new file mode 100644 index 000000000..28384963a --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/HexFormat.html @@ -0,0 +1,323 @@ + + + + + +HexFormat (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class HexFormat

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.base.internal.HexFormat
    • +
    +
  • +
+
+
    +
  • +
    +
    public class HexFormat
    +extends java.lang.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 Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      HexFormat() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringformatHex​(byte[] bytes) 
      byte[]parseHex​(java.lang.String hexString) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        HexFormat

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

      Method Detail

      + + + +
        +
      • +

        formatHex

        +
        public java.lang.String formatHex​(byte[] bytes)
        +
      • +
      + + + +
        +
      • +

        parseHex

        +
        public byte[] parseHex​(java.lang.String hexString)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/internal/InternalUtils.Joiner.html b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/InternalUtils.Joiner.html new file mode 100644 index 000000000..32c977d96 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/InternalUtils.Joiner.html @@ -0,0 +1,266 @@ + + + + + +InternalUtils.Joiner (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        join

        +
        java.lang.String join​(java.util.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-alpha3/org/bitcoinj/base/internal/InternalUtils.Splitter.html b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/InternalUtils.Splitter.html new file mode 100644 index 000000000..777a49306 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/InternalUtils.Splitter.html @@ -0,0 +1,266 @@ + + + + + +InternalUtils.Splitter (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        splitToList

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

Class InternalUtils

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

      Nested Class Summary

      + + + + + + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static interface InternalUtils.Joiner +
      A functional interface for joining Strings or Objects via Object.toString() using + a pre-configured delimiter.
      +
      static interface InternalUtils.Splitter +
      A functional interface for splitting Strings using a pre-configured regular expression.
      +
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      InternalUtils() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static java.lang.StringcommaJoin​(java.lang.String... strings) +
      Join strings with ", " skipping nulls
      +
      static <V> VgetUninterruptibly​(java.util.concurrent.Future<V> future) +
      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.
      +
      static InternalUtils.Joinerjoiner​(java.lang.String delimiter) +
      Return a lambda for joining Strings or Objects via Object.toString().
      +
      static InternalUtils.Splittersplitter​(java.lang.String regex) +
      Return a lambda for splitting a string into components
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        InternalUtils

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

      Method Detail

      + + + +
        +
      • +

        joiner

        +
        public static InternalUtils.Joiner joiner​(java.lang.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​(java.lang.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 java.lang.String commaJoin​(java.lang.String... strings)
        +
        Join strings with ", " skipping nulls
        +
        +
        Parameters:
        +
        strings - varargs strings
        +
        Returns:
        +
        A joined string
        +
        +
      • +
      + + + +
        +
      • +

        getUninterruptibly

        +
        public static <V> V getUninterruptibly​(java.util.concurrent.Future<V> future)
        +                                throws java.util.concurrent.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:
        +
        java.util.concurrent.ExecutionException - if the computation through an exception
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/internal/PlatformUtils.OS.html b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/PlatformUtils.OS.html new file mode 100644 index 000000000..fe805a89f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/PlatformUtils.OS.html @@ -0,0 +1,393 @@ + + + + + +PlatformUtils.OS (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum PlatformUtils.OS

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<PlatformUtils.OS>
    • +
    • +
        +
      • org.bitcoinj.base.internal.PlatformUtils.OS
      • +
      +
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      LINUX 
      MAC_OS 
      WINDOWS 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static PlatformUtils.OSvalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static PlatformUtils.OS[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static PlatformUtils.OS[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (PlatformUtils.OS c : PlatformUtils.OS.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static PlatformUtils.OS valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/internal/PlatformUtils.Runtime.html b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/PlatformUtils.Runtime.html new file mode 100644 index 000000000..3b7c594bc --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/PlatformUtils.Runtime.html @@ -0,0 +1,393 @@ + + + + + +PlatformUtils.Runtime (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum PlatformUtils.Runtime

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static PlatformUtils.RuntimevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static PlatformUtils.Runtime[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static PlatformUtils.Runtime[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (PlatformUtils.Runtime c : PlatformUtils.Runtime.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static PlatformUtils.Runtime valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/internal/PlatformUtils.html b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/PlatformUtils.html new file mode 100644 index 000000000..00d6dbd1f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/PlatformUtils.html @@ -0,0 +1,459 @@ + + + + + +PlatformUtils (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PlatformUtils

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

      Constructor Detail

      + + + +
        +
      • +

        PlatformUtils

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

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/base/internal/Preconditions.html b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/Preconditions.html new file mode 100644 index 000000000..241bb733c --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/Preconditions.html @@ -0,0 +1,420 @@ + + + + + +Preconditions (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Preconditions

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

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Preconditions() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static <X extends java.lang.Throwable>
      void
      check​(boolean expression, + java.util.function.Supplier<? extends X> exceptionSupplier) +
      Ensures the truth of an expression, throwing a custom exception if untrue.
      +
      static voidcheckArgument​(boolean expression) +
      Ensures the truth of an expression involving one or more parameters to the calling method.
      +
      static voidcheckArgument​(boolean expression, + java.util.function.Supplier<java.lang.String> messageSupplier) +
      Ensures the truth of an expression involving one or more parameters to the calling method.
      +
      static voidcheckState​(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 voidcheckState​(boolean expression, + java.util.function.Supplier<java.lang.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 Detail

      + + + +
        +
      • +

        Preconditions

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

      Method Detail

      + + + +
        +
      • +

        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:
        +
        java.lang.IllegalArgumentException - if expression is false
        +
        +
      • +
      + + + +
        +
      • +

        checkArgument

        +
        public static void checkArgument​(boolean expression,
        +                                 java.util.function.Supplier<java.lang.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:
        +
        java.lang.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:
        +
        java.lang.IllegalStateException - if expression is false
        +
        +
      • +
      + + + +
        +
      • +

        checkState

        +
        public static void checkState​(boolean expression,
        +                              java.util.function.Supplier<java.lang.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:
        +
        java.lang.IllegalStateException - if expression is false
        +
        +
      • +
      + + + +
        +
      • +

        check

        +
        public static <X extends java.lang.Throwable> void check​(boolean expression,
        +                                                         java.util.function.Supplier<? extends X> exceptionSupplier)
        +                                                  throws X extends java.lang.Throwable
        +
        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
        +
        X extends java.lang.Throwable
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/internal/Stopwatch.html b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/Stopwatch.html new file mode 100644 index 000000000..b66aabb7b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/Stopwatch.html @@ -0,0 +1,431 @@ + + + + + +Stopwatch (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Stopwatch

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

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.time.temporal.TemporaladdTo​(java.time.temporal.Temporal temporal) 
      java.time.Durationelapsed() +
      Gets the elapsed time on the watch.
      +
      longget​(java.time.temporal.TemporalUnit temporalUnit) 
      java.util.List<java.time.temporal.TemporalUnit>getUnits() 
      booleanisRunning() +
      Returns true if the stopwatch is running.
      +
      static Stopwatchstart() +
      Start a newly created stopwatch.
      +
      Stopwatchstop() +
      Stops the stopwatch, if it is running.
      +
      java.time.temporal.TemporalsubtractFrom​(java.time.temporal.Temporal temporal) 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Method Detail

      + + + +
        +
      • +

        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 java.time.Duration elapsed()
        +
        Gets the elapsed time on the watch. This doesn't stop the watch.
        +
        +
        Returns:
        +
        elapsed time
        +
        +
      • +
      + + + +
        +
      • +

        get

        +
        public long get​(java.time.temporal.TemporalUnit temporalUnit)
        +
        +
        Specified by:
        +
        get in interface java.time.temporal.TemporalAmount
        +
        +
      • +
      + + + +
        +
      • +

        getUnits

        +
        public java.util.List<java.time.temporal.TemporalUnit> getUnits()
        +
        +
        Specified by:
        +
        getUnits in interface java.time.temporal.TemporalAmount
        +
        +
      • +
      + + + +
        +
      • +

        addTo

        +
        public java.time.temporal.Temporal addTo​(java.time.temporal.Temporal temporal)
        +
        +
        Specified by:
        +
        addTo in interface java.time.temporal.TemporalAmount
        +
        +
      • +
      + + + +
        +
      • +

        subtractFrom

        +
        public java.time.temporal.Temporal subtractFrom​(java.time.temporal.Temporal temporal)
        +
        +
        Specified by:
        +
        subtractFrom in interface java.time.temporal.TemporalAmount
        +
        +
      • +
      + + + +
        +
      • +

        toString

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

Class StreamUtils

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.base.internal.StreamUtils
    • +
    +
  • +
+
+
    +
  • +
    +
    public class StreamUtils
    +extends java.lang.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 Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      StreamUtils() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static <T> java.util.stream.Collector<T,​?,​java.util.List<T>>toUnmodifiableList() +
      Return a collector that collects a Stream into an unmodifiable list.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        StreamUtils

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

      Method Detail

      + + + +
        +
      • +

        toUnmodifiableList

        +
        public static <T> java.util.stream.Collector<T,​?,​java.util.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-alpha3/org/bitcoinj/base/internal/TimeUtils.html b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/TimeUtils.html new file mode 100644 index 000000000..ed93cccea --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/TimeUtils.html @@ -0,0 +1,483 @@ + + + + + +TimeUtils (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class TimeUtils

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

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      TimeUtils() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static voidclearMockClock() +
      Clears the mock clock and causes time to tick again.
      +
      static java.time.InstantcurrentTime() +
      Returns the current time as an Instant, or a mocked out equivalent.
      +
      static java.lang.StringdateTimeFormat​(java.time.Instant time) +
      Formats a given date+time value to an ISO 8601 string.
      +
      static java.time.Instantearlier​(java.time.Instant time1, + java.time.Instant time2) +
      Determines the earlier of two instants.
      +
      static java.time.DurationelapsedTime​(java.time.Instant start) +
      Returns elapsed time between given start and current time as a Duration.
      +
      static java.time.Instantlater​(java.time.Instant time1, + java.time.Instant time2) +
      Determines the later of two instants.
      +
      static java.time.Durationlongest​(java.time.Duration duration1, + java.time.Duration duration2) +
      Determines the longest of two durations.
      +
      static voidrollMockClock​(java.time.Duration delta) +
      Rolls an already set mock clock by the given duration.
      +
      static voidsetMockClock() +
      Sets the mock clock to the current time as a fixed instant.
      +
      static voidsetMockClock​(java.time.Instant fixedInstant) +
      Sets the mock clock to a fixed instant.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        TimeUtils

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

      Method Detail

      + + + +
        +
      • +

        setMockClock

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

        setMockClock

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

        rollMockClock

        +
        public static void rollMockClock​(java.time.Duration delta)
        +
        Rolls an already set mock clock by the given duration.
        +
        +
        Parameters:
        +
        delta - amount to roll the mock clock, can be negative
        +
        Throws:
        +
        java.lang.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 java.time.Instant currentTime()
        +
        Returns the current time as an Instant, or a mocked out equivalent.
        +
      • +
      + + + +
        +
      • +

        elapsedTime

        +
        public static java.time.Duration elapsedTime​(java.time.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 java.time.Instant earlier​(java.time.Instant time1,
        +                                        java.time.Instant time2)
        +
        Determines the earlier of two instants.
        +
      • +
      + + + +
        +
      • +

        later

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

        longest

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

        dateTimeFormat

        +
        public static java.lang.String dateTimeFormat​(java.time.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-alpha3/org/bitcoinj/base/internal/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/package-summary.html new file mode 100644 index 000000000..d9de649aa --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/package-summary.html @@ -0,0 +1,273 @@ + + + + + +org.bitcoinj.base.internal (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.base.internal

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + +
    Interface Summary 
    InterfaceDescription
    FutureUtils.ThrowingSupplier<T> +
    Subinterface of Supplier for Lambdas which throw exceptions.
    +
    InternalUtils.Joiner +
    A functional interface for joining Strings or Objects via Object.toString() using + a pre-configured delimiter.
    +
    InternalUtils.Splitter +
    A functional interface for splitting Strings using a pre-configured regular expression.
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    Buffers +
    Utility methods for common operations on Bitcoin P2P message buffers.
    +
    ByteArray +
    An effectively-immutable byte array.
    +
    ByteUtils +
    Utility methods for bit, byte, and integer manipulation and conversion.
    +
    FutureUtils +
    Utilities for CompletableFuture.
    +
    HexFormat +
    This class implements a subset of the functionality of the HexFormat class available in Java 17 and later.
    +
    InternalUtils +
    Utilities for internal use only.
    +
    PlatformUtils +
    Utilities for determining platform information (OS and runtime)
    +
    Preconditions 
    Stopwatch +
    A tool for measuring time, mainly for log messages.
    +
    StreamUtils +
    Stream Utilities.
    +
    TimeUtils +
    Utilities for time and mock time.
    +
    +
  • +
  • + + + + + + + + + + + + + + + + +
    Enum Summary 
    EnumDescription
    PlatformUtils.OS 
    PlatformUtils.Runtime 
    +
  • +
+
+
+
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/internal/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/package-tree.html new file mode 100644 index 000000000..d8ea6d3bc --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/internal/package-tree.html @@ -0,0 +1,198 @@ + + + + + +org.bitcoinj.base.internal Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.base.internal

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Hierarchy

+
    +
  • java.lang.Object + +
  • +
+
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/base/package-summary.html new file mode 100644 index 000000000..0877bd838 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/package-summary.html @@ -0,0 +1,324 @@ + + + + + +org.bitcoinj.base (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

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.)

+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Interface Summary 
    InterfaceDescription
    Address +
    Interface for addresses, e.g.
    +
    AddressParser +
    Functional interface for parsing an Address.
    +
    AddressParser.AddressParserProvider +
    Interface implemented by custom address parser providers.
    +
    Monetary +
    Classes implementing this interface represent a monetary value, such as a Bitcoin or fiat amount.
    +
    Network +
    Interface for a generic Bitcoin-like cryptocurrency network.
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    Base58 +
    Base58 is a way to encode Bitcoin addresses (or arbitrary data) as alphanumeric strings.
    +
    Bech32 +
    Implementation of the Bech32 encoding.
    +
    Bech32.Bech32Bytes +
    Binary data in 5-bits-per-byte format as used in Bech32 encoding/decoding.
    +
    Bech32.Bech32Data +
    Bech32 data in 5-bit byte format with Bech32.Encoding and human-readable part (HRP) information.
    +
    Coin +
    Represents a monetary Bitcoin value.
    +
    LegacyAddress +
    A Bitcoin address looks like 1MsScoe2fTJoq4ZPdQgqyhgWeoNamYPevy and is derived from an elliptic curve public key + plus a set of network parameters.
    +
    SegwitAddress +
    Implementation of native segwit addresses.
    +
    Sha256Hash +
    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.
    +
    VarInt +
    A variable-length encoded unsigned integer using Satoshi's encoding (a.k.a.
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Enum Summary 
    EnumDescription
    Bech32.Encoding +
    Enumeration of known Bech32 encoding format types: Bech32 and Bech32m.
    +
    BitcoinNetwork +
    A convenient enum representation of a Bitcoin network.
    +
    LegacyAddress.AddressHeader +
    Address header of legacy P2PKH addresses for standard Bitcoin networks.
    +
    LegacyAddress.P2SHHeader +
    Address header of legacy P2SH addresses for standard Bitcoin networks.
    +
    ScriptType +
    Supported Bitcoin script types and their script identifier strings.
    +
    SegwitAddress.SegwitHrp +
    Human-readable part (HRP) of Segwit addresses for standard Bitcoin networks.
    +
    +
  • +
+
+
+
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/base/package-tree.html new file mode 100644 index 000000000..e65f68c28 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/package-tree.html @@ -0,0 +1,209 @@ + + + + + +org.bitcoinj.base Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.base

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Hierarchy

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

Class Fiat

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.base.utils.Fiat
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.lang.Comparable<Fiat>, Monetary
    +
    +
    +
    public final class Fiat
    +extends java.lang.Object
    +implements Monetary, java.lang.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 TypeFieldDescription
      java.lang.StringcurrencyCode 
      static intSMALLEST_UNIT_EXPONENT +
      The absolute value of exponent of the value of a "smallest unit" in scientific notation.
      +
      longvalue +
      The number of smallest units of this monetary value.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      Fiatadd​(Fiat value) 
      intcompareTo​(Fiat other) 
      Fiatdivide​(long divisor) 
      longdivide​(Fiat divisor) 
      Fiat[]divideAndRemainder​(long divisor) 
      booleanequals​(java.lang.Object o) 
      java.lang.StringgetCurrencyCode() 
      longgetValue() +
      Returns the number of "smallest units" of this monetary value.
      +
      inthashCode() 
      booleanisGreaterThan​(Fiat other) +
      Returns true if the monetary value represented by this instance is greater than that of the given other Fiat, + otherwise false.
      +
      booleanisLessThan​(Fiat other) +
      Returns true if the monetary value represented by this instance is less than that of the given other Fiat, + otherwise false.
      +
      booleanisNegative() +
      Returns true if and only if this instance represents a monetary value less than zero, otherwise false.
      +
      booleanisPositive() +
      Returns true if and only if this instance represents a monetary value greater than zero, otherwise false.
      +
      booleanisZero() +
      Returns true if and only if this instance represents zero monetary value, otherwise false.
      +
      longlongValue() +
      Returns the number of "smallest units" of this monetary value.
      +
      Fiatmultiply​(long factor) 
      Fiatnegate() 
      static FiatparseFiat​(java.lang.String currencyCode, + java.lang.String str) +
      Parses an amount expressed in the way humans are used to.
      +
      static FiatparseFiatInexact​(java.lang.String currencyCode, + java.lang.String str) +
      Parses an amount expressed in the way humans are used to.
      +
      intsignum() 
      intsmallestUnitExponent() +
      Returns the absolute value of exponent of the value of a "smallest unit" in scientific notation.
      +
      Fiatsubtract​(Fiat value) 
      java.lang.StringtoFriendlyString() +
      Returns the value as a 0.12 type string.
      +
      java.lang.StringtoPlainString() +
      + Returns the value as a plain string.
      +
      java.lang.StringtoString() 
      static FiatvalueOf​(java.lang.String currencyCode, + long value) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        value

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

        currencyCode

        +
        public final java.lang.String currencyCode
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        valueOf

        +
        public static Fiat valueOf​(java.lang.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 java.lang.String getCurrencyCode()
        +
      • +
      + + + +
        +
      • +

        parseFiat

        +
        public static Fiat parseFiat​(java.lang.String currencyCode,
        +                             java.lang.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:
        +
        java.lang.IllegalArgumentException - if you try to specify more than 4 digits after the comma, or a value out of range.
        +
        +
      • +
      + + + +
        +
      • +

        parseFiatInexact

        +
        public static Fiat parseFiatInexact​(java.lang.String currencyCode,
        +                                    java.lang.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:
        +
        java.lang.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 java.lang.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 java.lang.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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        compareTo

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

Class MonetaryFormat

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.base.utils.MonetaryFormat
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class MonetaryFormat
    +extends java.lang.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 Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      static MonetaryFormatBTC +
      Standard format for the BTC denomination.
      +
      static java.lang.StringCODE_BTC +
      Currency code for base 1 Bitcoin.
      +
      static java.lang.StringCODE_MBTC +
      Currency code for base 1/1000 Bitcoin.
      +
      static java.lang.StringCODE_SAT +
      Currency code for base 1 satoshi.
      +
      static java.lang.StringCODE_UBTC +
      Currency code for base 1/1000000 Bitcoin.
      +
      static MonetaryFormatFIAT +
      Standard format for fiat amounts.
      +
      static intMAX_DECIMALS 
      static MonetaryFormatMBTC +
      Standard format for the mBTC denomination.
      +
      static MonetaryFormatSAT +
      Standard format for the satoshi denomination.
      +
      static java.lang.StringSYMBOL_BTC +
      Currency symbol for base 1 Bitcoin.
      +
      static java.lang.StringSYMBOL_MBTC +
      Currency symbol for base 1/1000 Bitcoin.
      +
      static java.lang.StringSYMBOL_SAT +
      Currency symbol for base 1 satoshi.
      +
      static java.lang.StringSYMBOL_UBTC +
      Currency symbol for base 1/1000000 Bitcoin.
      +
      static MonetaryFormatUBTC +
      Standard format for the µBTC denomination.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      MonetaryFormat() +
      Construct a MonetaryFormat with the default configuration.
      +
      MonetaryFormat​(boolean useSymbol) +
      Construct a MonetaryFormat with the default configuration.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.Stringcode() +
      Get currency code that will be used for current shift.
      +
      MonetaryFormatcode​(int codeShift, + java.lang.String code) +
      Configure currency code for given decimal separator shift.
      +
      MonetaryFormatcodeSeparator​(char codeSeparator) +
      Separator between currency code and formatted value.
      +
      MonetaryFormatdecimalMark​(char decimalMark) +
      Set character to use as the decimal mark.
      +
      MonetaryFormatdigits​(char zeroDigit) +
      Set character range to use for representing digits.
      +
      booleanequals​(java.lang.Object o) +
      Two formats are equal if they have the same parameters.
      +
      java.lang.CharSequenceformat​(Monetary monetary) +
      Format the given monetary value to a human-readable form.
      +
      inthashCode() 
      MonetaryFormatminDecimals​(int minDecimals) +
      Set minimum number of decimals to use for formatting.
      +
      MonetaryFormatnegativeSign​(char negativeSign) +
      Set character to prefix negative values.
      +
      MonetaryFormatnoCode() +
      Don't display currency code when formatting.
      +
      MonetaryFormatoptionalDecimals​(int... groups) +
      + Set additional groups of decimals to use after the minimum decimals, if they are useful for expressing precision.
      +
      Coinparse​(java.lang.String str) +
      Parse a human-readable coin value to a Coin instance.
      +
      FiatparseFiat​(java.lang.String currencyCode, + java.lang.String str) +
      Parse a human-readable fiat value to a Fiat instance.
      +
      MonetaryFormatpositiveSign​(char positiveSign) +
      Set character to prefix positive values.
      +
      MonetaryFormatpostfixCode() +
      Postfix formatted output with currency code.
      +
      MonetaryFormatprefixCode() +
      Prefix formatted output by currency code.
      +
      MonetaryFormatrepeatOptionalDecimals​(int decimals, + int repetitions) +
      + Set repeated additional groups of decimals to use after the minimum decimals, if they are useful for expressing + precision.
      +
      MonetaryFormatroundingMode​(java.math.RoundingMode roundingMode) +
      Set rounding mode to use when it becomes necessary.
      +
      MonetaryFormatshift​(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.
      +
      MonetaryFormatwithLocale​(java.util.Locale locale) +
      Configure this instance with values from a Locale.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        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 java.lang.String CODE_BTC
        +
        Currency code for base 1 Bitcoin.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        CODE_MBTC

        +
        public static final java.lang.String CODE_MBTC
        +
        Currency code for base 1/1000 Bitcoin.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        CODE_UBTC

        +
        public static final java.lang.String CODE_UBTC
        +
        Currency code for base 1/1000000 Bitcoin.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        CODE_SAT

        +
        public static final java.lang.String CODE_SAT
        +
        Currency code for base 1 satoshi.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        SYMBOL_BTC

        +
        public static final java.lang.String SYMBOL_BTC
        +
        Currency symbol for base 1 Bitcoin.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        SYMBOL_MBTC

        +
        public static final java.lang.String SYMBOL_MBTC
        +
        Currency symbol for base 1/1000 Bitcoin.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        SYMBOL_UBTC

        +
        public static final java.lang.String SYMBOL_UBTC
        +
        Currency symbol for base 1/1000000 Bitcoin.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        SYMBOL_SAT

        +
        public static final java.lang.String SYMBOL_SAT
        +
        Currency symbol for base 1 satoshi.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + + +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        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​(java.math.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,
        +                           java.lang.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​(java.util.Locale locale)
        +
        Configure this instance with values from a Locale.
        +
      • +
      + + + +
        +
      • +

        format

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

        parse

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

        parseFiat

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

        code

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

        equals

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

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/utils/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/base/utils/package-summary.html new file mode 100644 index 000000000..68870a945 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/utils/package-summary.html @@ -0,0 +1,173 @@ + + + + + +org.bitcoinj.base.utils (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.base.utils

+
+
+
    +
  • + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    Fiat +
    Represents a monetary fiat value.
    +
    MonetaryFormat +
    + Utility for formatting and parsing coin values to and from human-readable form.
    +
    +
  • +
+
+
+
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/base/utils/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/base/utils/package-tree.html new file mode 100644 index 000000000..0ee382374 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/base/utils/package-tree.html @@ -0,0 +1,162 @@ + + + + + +org.bitcoinj.base.utils Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.base.utils

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • org.bitcoinj.base.utils.Fiat (implements java.lang.Comparable<T>, org.bitcoinj.base.Monetary)
    • +
    • org.bitcoinj.base.utils.MonetaryFormat
    • +
    +
  • +
+
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/AbstractBlockChain.NewBlockType.html b/javadoc/0.17-alpha3/org/bitcoinj/core/AbstractBlockChain.NewBlockType.html new file mode 100644 index 000000000..4cdcf2000 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/AbstractBlockChain.NewBlockType.html @@ -0,0 +1,387 @@ + + + + + +AbstractBlockChain.NewBlockType (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum AbstractBlockChain.NewBlockType

+
+
+ +
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      BEST_CHAIN +
      New block is on the best chain
      +
      SIDE_CHAIN +
      New block is on a side chain
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static AbstractBlockChain.NewBlockTypevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static AbstractBlockChain.NewBlockType[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static AbstractBlockChain.NewBlockType[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (AbstractBlockChain.NewBlockType c : AbstractBlockChain.NewBlockType.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static AbstractBlockChain.NewBlockType valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/AbstractBlockChain.html b/javadoc/0.17-alpha3/org/bitcoinj/core/AbstractBlockChain.html new file mode 100644 index 000000000..27a03b9d0 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/AbstractBlockChain.html @@ -0,0 +1,1441 @@ + + + + + +AbstractBlockChain (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class AbstractBlockChain

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.AbstractBlockChain
    • +
    +
  • +
+
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    BlockChain, FullPrunedBlockChain
    +
    +
    +
    public abstract class AbstractBlockChain
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        lock

        +
        protected final java.util.concurrent.locks.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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        FP_ESTIMATOR_BETA

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

      Constructor Detail

      + + + +
        +
      • +

        AbstractBlockChain

        +
        public AbstractBlockChain​(Network network,
        +                          java.util.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,
        +                          java.util.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 Detail

      + + + +
        +
      • +

        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​(java.util.concurrent.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​(java.util.concurrent.Executor executor,
        +                                        ReorganizeListener listener)
        +
        Adds a generic ReorganizeListener 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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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 java.util.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().
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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 java.time.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 java.util.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-alpha3/org/bitcoinj/core/AddressMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/AddressMessage.html new file mode 100644 index 000000000..3943c9d0d --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/AddressMessage.html @@ -0,0 +1,458 @@ + + + + + +AddressMessage (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AddressMessage

        +
        protected AddressMessage​(java.util.List<PeerAddress> addresses)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        readAddresses

        +
        protected static java.util.List<PeerAddress> readAddresses​(java.nio.ByteBuffer payload,
        +                                                           int protocolVariant)
        +                                                    throws java.nio.BufferUnderflowException,
        +                                                           ProtocolException
        +
        +
        Throws:
        +
        java.nio.BufferUnderflowException
        +
        ProtocolException
        +
        +
      • +
      + + + +
        +
      • +

        addAddress

        +
        public abstract void addAddress​(PeerAddress address)
        +
      • +
      + + + +
        +
      • +

        removeAddress

        +
        public void removeAddress​(int index)
        +
      • +
      + + + +
        +
      • +

        getAddresses

        +
        public java.util.List<PeerAddress> getAddresses()
        +
        +
        Returns:
        +
        An unmodifiableList view of the backing List of addresses. Addresses contained within the list may be + safely modified.
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/AddressV1Message.html b/javadoc/0.17-alpha3/org/bitcoinj/core/AddressV1Message.html new file mode 100644 index 000000000..9237bd7db --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/AddressV1Message.html @@ -0,0 +1,402 @@ + + + + + +AddressV1Message (bitcoinj-core 0.17-SNAPSHOT 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.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

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

        bitcoinSerializeToStream

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

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/AddressV2Message.html b/javadoc/0.17-alpha3/org/bitcoinj/core/AddressV2Message.html new file mode 100644 index 000000000..5d1224ea8 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/AddressV2Message.html @@ -0,0 +1,404 @@ + + + + + +AddressV2Message (bitcoinj-core 0.17-SNAPSHOT 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.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

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

        bitcoinSerializeToStream

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

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/BaseMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/BaseMessage.html new file mode 100644 index 000000000..6e90b08fe --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/BaseMessage.html @@ -0,0 +1,397 @@ + + + + + +BaseMessage (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BaseMessage

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.BaseMessage
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BaseMessage

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

      Method Detail

      + + + +
        +
      • +

        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​(java.io.OutputStream stream)
        +                                          throws java.io.IOException
        +
        Serializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().
        +
        +
        Throws:
        +
        java.io.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-alpha3/org/bitcoinj/core/BitcoinSerializer.BitcoinPacketHeader.html b/javadoc/0.17-alpha3/org/bitcoinj/core/BitcoinSerializer.BitcoinPacketHeader.html new file mode 100644 index 000000000..6ec05a538 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/BitcoinSerializer.BitcoinPacketHeader.html @@ -0,0 +1,382 @@ + + + + + +BitcoinSerializer.BitcoinPacketHeader (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BitcoinSerializer.BitcoinPacketHeader

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

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      byte[]checksum 
      java.lang.Stringcommand 
      byte[]header 
      static intHEADER_LENGTH +
      The largest number of bytes that a header can represent
      +
      intsize 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      BitcoinPacketHeader​(java.nio.ByteBuffer in) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        HEADER_LENGTH

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

        header

        +
        public final byte[] header
        +
      • +
      + + + +
        +
      • +

        command

        +
        public final java.lang.String command
        +
      • +
      + + + +
        +
      • +

        size

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

        checksum

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

      Constructor Detail

      + + + +
        +
      • +

        BitcoinPacketHeader

        +
        public BitcoinPacketHeader​(java.nio.ByteBuffer in)
        +                    throws ProtocolException,
        +                           java.nio.BufferUnderflowException
        +
        +
        Throws:
        +
        ProtocolException
        +
        java.nio.BufferUnderflowException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/BitcoinSerializer.html b/javadoc/0.17-alpha3/org/bitcoinj/core/BitcoinSerializer.html new file mode 100644 index 000000000..af1a6d45b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/BitcoinSerializer.html @@ -0,0 +1,801 @@ + + + + + +BitcoinSerializer (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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-alpha3/org/bitcoinj/core/Block.VerifyFlag.html b/javadoc/0.17-alpha3/org/bitcoinj/core/Block.VerifyFlag.html new file mode 100644 index 000000000..fd9b57a6e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/Block.VerifyFlag.html @@ -0,0 +1,372 @@ + + + + + +Block.VerifyFlag (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum Block.VerifyFlag

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

      Enum Constant Summary

      + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      HEIGHT_IN_COINBASE +
      Check that block height is in coinbase transaction (BIP 34).
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static Block.VerifyFlagvalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static Block.VerifyFlag[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        HEIGHT_IN_COINBASE

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

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static Block.VerifyFlag[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (Block.VerifyFlag c : Block.VerifyFlag.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static Block.VerifyFlag valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/Block.html b/javadoc/0.17-alpha3/org/bitcoinj/core/Block.html new file mode 100644 index 000000000..62220eef9 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/Block.html @@ -0,0 +1,1552 @@ + + + + + +Block (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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.

    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static class Block.VerifyFlag +
      Flags used to control which elements of block validation are done on + received blocks.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      static intBLOCK_HEIGHT_GENESIS +
      Height of the first block
      +
      static intBLOCK_HEIGHT_UNKNOWN +
      Value to use if the block height is unknown
      +
      static longBLOCK_VERSION_BIP34 +
      Block version introduced in BIP 34: Height in coinbase
      +
      static longBLOCK_VERSION_BIP65 +
      Block version introduced in BIP 65: OP_CHECKLOCKTIMEVERIFY
      +
      static longBLOCK_VERSION_BIP66 +
      Block version introduced in BIP 66: Strict DER signatures
      +
      static longBLOCK_VERSION_GENESIS 
      static longEASIEST_DIFFICULTY_TARGET +
      A value for difficultyTarget (nBits) that allows (slightly less than) half of all possible hash solutions.
      +
      static intHEADER_SIZE +
      How many bytes are required to represent a block header WITHOUT the trailing 00 length byte.
      +
      static intMAX_BLOCK_SIGOPS +
      A "sigop" is a signature verification operation.
      +
      static intMAX_BLOCK_SIZE +
      A constant shared by the entire network: how large in bytes a block is allowed to be.
      +
      static longSTANDARD_MAX_DIFFICULTY_TARGET +
      Standard maximum value for difficultyTarget (nBits) (Bitcoin MainNet and TestNet)
      +
      + +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      voidaddTransaction​(Transaction t) +
      Adds a transaction to this block.
      +
      protected voidbitcoinSerializeToStream​(java.io.OutputStream stream) +
      Serializes this message to the provided stream.
      +
      protected booleancheckProofOfWork​(boolean throwException) +
      Returns true if the hash of the block is OK (lower than difficulty target).
      +
      BlockcloneAsHeader() +
      Returns a copy of the block, but without any transactions.
      +
      static BlockcreateGenesis​(java.time.Instant time, + long difficultyTarget) 
      static BlockcreateGenesis​(java.time.Instant time, + long difficultyTarget, + long nonce) 
      BlockcreateNextBlock​(Address to) +
      This method is intended for test use only.
      +
      BlockcreateNextBlock​(Address to, + long version, + java.time.Instant time, + int height) +
      Returns a solved block that builds on top of this one.
      +
      BlockcreateNextBlock​(Address to, + Coin coinbaseValue) +
      This method is intended for test use only.
      +
      BlockcreateNextBlock​(Address to, + TransactionOutPoint prevOut) +
      This method is intended for test use only.
      +
      BlockcreateNextBlockWithCoinbase​(long version, + byte[] pubKey, + Coin coinbaseValue, + int height) +
      This method is intended for test use only.
      +
      booleanequals​(java.lang.Object o) 
      longgetDifficultyTarget() +
      Returns the difficulty of the proof of work that this block should meet encoded in compact form.
      +
      java.math.BigIntegergetDifficultyTargetAsInteger() +
      Returns the difficulty target as a 256 bit value that can be compared to a SHA-256 hash.
      +
      Sha256HashgetHash() +
      Returns the hash of the block (which for a valid, solved block should be + below the target).
      +
      java.lang.StringgetHashAsString() +
      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.
      +
      Sha256HashgetMerkleRoot() +
      Returns the merkle root in big endian form, calculating it from transactions if necessary.
      +
      longgetNonce() +
      Returns the nonce, an arbitrary value that exists only to make the hash of the block header fall below the + difficulty target.
      +
      Sha256HashgetPrevBlockHash() +
      Returns the hash of the previous block in the chain, as defined by the block header.
      +
      java.util.DategetTime() +
      Deprecated. +
      use time()
      +
      +
      longgetTimeSeconds() +
      Deprecated. +
      use time()
      +
      +
      java.util.List<Transaction>getTransactions() +
      Returns an unmodifiable list of transactions held in this block, or null if this object represents just a header.
      +
      longgetVersion() +
      Returns the version of the block data structure as defined by the Bitcoin protocol.
      +
      Sha256HashgetWitnessRoot() +
      Returns the witness root in big endian form, calculating it from transactions if necessary.
      +
      java.math.BigIntegergetWork() +
      Returns the work represented by this block.
      +
      inthashCode() 
      booleanhasTransactions() +
      Return whether this block contains any transactions.
      +
      booleanisBIP34() +
      Returns whether this block conforms to + BIP34: Height in Coinbase.
      +
      booleanisBIP65() +
      Returns whether this block conforms to + BIP65: OP_CHECKLOCKTIMEVERIFY.
      +
      booleanisBIP66() +
      Returns whether this block conforms to + BIP66: Strict DER signatures.
      +
      intmessageSize() +
      Return the size of the serialized message.
      +
      static Blockread​(java.nio.ByteBuffer payload) +
      Deserialize this message from a given payload.
      +
      voidsolve() +
      Finds a value of nonce that makes the blocks hash lower than the difficulty target.
      +
      java.time.Instanttime() +
      Returns the time at which the block was solved and broadcast, according to the clock of the solving node.
      +
      java.lang.StringtoString() +
      Returns a multi-line string containing a description of the contents of + the block.
      +
      protected voidunCache() 
      static voidverify​(NetworkParameters params, + Block block, + int height, + java.util.EnumSet<Block.VerifyFlag> flags) +
      Verifies both the header and that the transactions hash to the merkle root.
      +
      static voidverifyHeader​(Block block) +
      Checks the block data to ensure it follows the rules laid out in the network parameters.
      +
      static voidverifyTransactions​(NetworkParameters params, + Block block, + int height, + java.util.EnumSet<Block.VerifyFlag> flags) +
      Checks the block contents
      +
      + +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        STANDARD_MAX_DIFFICULTY_TARGET

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

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        BLOCK_HEIGHT_UNKNOWN

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

        BLOCK_HEIGHT_GENESIS

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

        BLOCK_VERSION_GENESIS

        +
        public static final long BLOCK_VERSION_GENESIS
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        BLOCK_VERSION_BIP34

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

        BLOCK_VERSION_BIP66

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

        BLOCK_VERSION_BIP65

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

      Constructor Detail

      + + + +
        +
      • +

        Block

        +
        public Block​(long version,
        +             Sha256Hash prevBlockHash,
        +             Sha256Hash merkleRoot,
        +             java.time.Instant time,
        +             long difficultyTarget,
        +             long nonce,
        +             @Nullable
        +             java.util.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
        +             java.util.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 Detail

      + + + +
        +
      • +

        read

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

        createGenesis

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

        createGenesis

        +
        public static Block createGenesis​(java.time.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​(java.io.OutputStream stream)
        +                                 throws java.io.IOException
        +
        Description copied from class: BaseMessage
        +
        Serializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().
        +
        +
        Specified by:
        +
        bitcoinSerializeToStream in class BaseMessage
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        unCache

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

        getHashAsString

        +
        public java.lang.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 java.math.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 java.lang.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 java.lang.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 java.math.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​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.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 java.time.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 java.util.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 java.util.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,
        +                             java.time.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).
        +
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        verify

        +
        public static void verify​(NetworkParameters params,
        +                          Block block,
        +                          int height,
        +                          java.util.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,
        +                                      java.util.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-alpha3/org/bitcoinj/core/BlockChain.html b/javadoc/0.17-alpha3/org/bitcoinj/core/BlockChain.html new file mode 100644 index 000000000..aa4562793 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/BlockChain.html @@ -0,0 +1,798 @@ + + + + + +BlockChain (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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 Detail

      + + + +
        +
      • +

        blockStore

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

      Method Detail

      + + + + + + + + + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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-alpha3/org/bitcoinj/core/BlockLocator.html b/javadoc/0.17-alpha3/org/bitcoinj/core/BlockLocator.html new file mode 100644 index 000000000..44f5b3cf3 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/BlockLocator.html @@ -0,0 +1,443 @@ + + + + + +BlockLocator (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BlockLocator

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

      Constructor Detail

      + + + +
        +
      • +

        BlockLocator

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

        BlockLocator

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

      Method Detail

      + + + + + + + +
        +
      • +

        size

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

        getHashes

        +
        public java.util.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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/BloomFilter.BloomUpdate.html b/javadoc/0.17-alpha3/org/bitcoinj/core/BloomFilter.BloomUpdate.html new file mode 100644 index 000000000..ea594ab6c --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/BloomFilter.BloomUpdate.html @@ -0,0 +1,398 @@ + + + + + +BloomFilter.BloomUpdate (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum BloomFilter.BloomUpdate

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<BloomFilter.BloomUpdate>
    +
    +
    +
    Enclosing class:
    +
    BloomFilter
    +
    +
    +
    public static enum BloomFilter.BloomUpdate
    +extends java.lang.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 Summary

      + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      UPDATE_ALL 
      UPDATE_NONE 
      UPDATE_P2PUBKEY_ONLY +
      Only adds outpoints to the filter if the output is a P2PK/pay-to-multisig script
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static BloomFilter.BloomUpdatevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static BloomFilter.BloomUpdate[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static BloomFilter.BloomUpdate[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (BloomFilter.BloomUpdate c : BloomFilter.BloomUpdate.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static BloomFilter.BloomUpdate valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/BloomFilter.html b/javadoc/0.17-alpha3/org/bitcoinj/core/BloomFilter.html new file mode 100644 index 000000000..449ee3d36 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/BloomFilter.html @@ -0,0 +1,748 @@ + + + + + +BloomFilter (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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 TypeClassDescription
      static class 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)
      +
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      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

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      FilteredBlockapplyAndUpdate​(Block block) +
      Creates a new FilteredBlock from the given Block, using this filter to select transactions.
      +
      booleanapplyAndUpdate​(Transaction tx) 
      protected voidbitcoinSerializeToStream​(java.io.OutputStream stream) +
      Serializes this message to the provided stream.
      +
      booleancontains​(byte[] object) +
      Returns true if the given object matches the filter either because it was inserted, or because we have a + false-positive.
      +
      booleanequals​(java.lang.Object o) 
      doublegetFalsePositiveRate​(int elements) +
      Returns the theoretical false positive rate of this filter if were to contain the given number of elements.
      +
      BloomFilter.BloomUpdategetUpdateFlag() +
      The update flag controls how application of the filter to a block modifies the filter.
      +
      inthashCode() 
      voidinsert​(byte[] object) +
      Insert the given arbitrary data into the filter
      +
      voidinsert​(TransactionOutPoint outpoint) +
      Inserts the given transaction outpoint.
      +
      voidinsert​(ECKey key) +
      Inserts the given key and equivalent hashed form (for the address).
      +
      booleanmatchesAll() +
      Returns true if this filter will match anything.
      +
      voidmerge​(BloomFilter filter) +
      Copies filter into this.
      +
      static intmurmurHash3​(byte[] data, + long nTweak, + int hashNum, + byte[] object) +
      Applies the MurmurHash3 (x86_32) algorithm to the given data.
      +
      static BloomFilterread​(java.nio.ByteBuffer payload) +
      Deserialize this message from a given payload.
      +
      voidsetMatchAll() +
      Sets this filter to match all objects.
      +
      java.lang.StringtoString() 
      + +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        read

        +
        public static BloomFilter read​(java.nio.ByteBuffer payload)
        +                        throws java.nio.BufferUnderflowException,
        +                               ProtocolException
        +
        Deserialize this message from a given payload.
        +
        +
        Parameters:
        +
        payload - payload to deserialize from
        +
        Returns:
        +
        read message
        +
        Throws:
        +
        java.nio.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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        bitcoinSerializeToStream

        +
        protected void bitcoinSerializeToStream​(java.io.OutputStream stream)
        +                                 throws java.io.IOException
        +
        Serializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().
        +
        +
        Specified by:
        +
        bitcoinSerializeToStream in class BaseMessage
        +
        Throws:
        +
        java.io.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​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/CheckpointManager.html b/javadoc/0.17-alpha3/org/bitcoinj/core/CheckpointManager.html new file mode 100644 index 000000000..4bedb2c50 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/CheckpointManager.html @@ -0,0 +1,589 @@ + + + + + +CheckpointManager (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CheckpointManager

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.CheckpointManager
    • +
    +
  • +
+
+
    +
  • +
    +
    public class CheckpointManager
    +extends java.lang.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.

    + +

    The file format consists of the string "CHECKPOINTS 1", followed by a uint32 containing the number of signatures + to read. The value may not be larger than 256 (so it could have been a byte but isn't for historical reasons). + 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 an int32 containing the number of checkpoints in the file. Then each checkpoint follows + one after the other. A checkpoint is 12 bytes for the total work done field, 4 bytes for the height, 80 bytes + for the block header and then 1 zero byte at the end (i.e. number of transactions in the block: always zero).

    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        checkpoints

        +
        protected final java.util.TreeMap<java.time.Instant,​StoredBlock> checkpoints
        +
      • +
      + + + + + + + +
        +
      • +

        dataHash

        +
        protected final Sha256Hash dataHash
        +
      • +
      + + + +
        +
      • +

        BASE64

        +
        public static final com.google.common.io.BaseEncoding BASE64
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CheckpointManager

        +
        public CheckpointManager​(NetworkParameters params)
        +                  throws java.io.IOException
        +
        Loads the default checkpoints bundled with bitcoinj
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        CheckpointManager

        +
        public CheckpointManager​(NetworkParameters params,
        +                         @Nullable
        +                         java.io.InputStream inputStream)
        +                  throws java.io.IOException
        +
        Loads the checkpoints from the given stream
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        openStream

        +
        public static java.io.InputStream openStream​(NetworkParameters params)
        +
        Returns a checkpoints stream pointing to inside the bitcoinj JAR
        +
      • +
      + + + +
        +
      • +

        getCheckpointBefore

        +
        public StoredBlock getCheckpointBefore​(java.time.Instant time)
        +
        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.
        +
      • +
      + + + + + + + +
        +
      • +

        numCheckpoints

        +
        public int numCheckpoints()
        +
        Returns the number of checkpoints that were loaded.
        +
      • +
      + + + +
        +
      • +

        getDataHash

        +
        public Sha256Hash getDataHash()
        +
        Returns a hash of the concatenated checkpoint data.
        +
      • +
      + + + +
        +
      • +

        checkpoint

        +
        public static void checkpoint​(NetworkParameters params,
        +                              java.io.InputStream checkpoints,
        +                              BlockStore store,
        +                              java.time.Instant time)
        +                       throws java.io.IOException,
        +                              BlockStoreException
        +

        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. Useful when you have just created + a new store from scratch and want to use configure it all in one go.

        + +

        Note that time is adjusted backwards by a week to account for possible clock drift in the block headers.

        +
        +
        Throws:
        +
        java.io.IOException
        +
        BlockStoreException
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/Context.html b/javadoc/0.17-alpha3/org/bitcoinj/core/Context.html new file mode 100644 index 000000000..5b6d410cc --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/Context.html @@ -0,0 +1,622 @@ + + + + + +Context (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Context

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.Context
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Context
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        DEFAULT_EVENT_HORIZON

        +
        public static final int DEFAULT_EVENT_HORIZON
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        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:
        +
        java.lang.IllegalStateException - if no context exists at all or if we are in strict mode and there is no 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-alpha3/org/bitcoinj/core/EmptyMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/EmptyMessage.html new file mode 100644 index 000000000..9fb40032c --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/EmptyMessage.html @@ -0,0 +1,390 @@ + + + + + +EmptyMessage (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class EmptyMessage

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        EmptyMessage

        +
        public EmptyMessage()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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​(java.io.OutputStream stream)
        +                                       throws java.io.IOException
        +
        Description copied from class: BaseMessage
        +
        Serializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().
        +
        +
        Specified by:
        +
        bitcoinSerializeToStream in class BaseMessage
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/FeeFilterMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/FeeFilterMessage.html new file mode 100644 index 000000000..94a462279 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/FeeFilterMessage.html @@ -0,0 +1,433 @@ + + + + + +FeeFilterMessage (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        of

        +
        public static FeeFilterMessage of​(Coin feeRate)
        +
        Create a fee filter message with a given fee rate.
        +
        +
        Parameters:
        +
        feeRate - fee rate
        +
        Returns:
        +
        fee filter message
        +
        +
      • +
      + + + +
        +
      • +

        read

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

        bitcoinSerializeToStream

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

        feeRate

        +
        public Coin feeRate()
        +
        Gets the fee rate.
        +
        +
        Returns:
        +
        fee rate
        +
        +
      • +
      + + + +
        +
      • +

        getFeeRate

        +
        @Deprecated
        +public Coin getFeeRate()
        +
        Deprecated. + +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/FilteredBlock.html b/javadoc/0.17-alpha3/org/bitcoinj/core/FilteredBlock.html new file mode 100644 index 000000000..8931b7168 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/FilteredBlock.html @@ -0,0 +1,575 @@ + + + + + +FilteredBlock (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

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

        bitcoinSerializeToStream

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

        getTransactionHashes

        +
        public java.util.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 java.util.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​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/FullPrunedBlockChain.html b/javadoc/0.17-alpha3/org/bitcoinj/core/FullPrunedBlockChain.html new file mode 100644 index 000000000..6364ee90a --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/FullPrunedBlockChain.html @@ -0,0 +1,775 @@ + + + + + +FullPrunedBlockChain (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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-alpha3/org/bitcoinj/core/GetAddrMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/GetAddrMessage.html new file mode 100644 index 000000000..26d993ad6 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/GetAddrMessage.html @@ -0,0 +1,322 @@ + + + + + +GetAddrMessage (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        GetAddrMessage

        +
        public GetAddrMessage()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/GetBlocksMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/GetBlocksMessage.html new file mode 100644 index 000000000..fdb342759 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/GetBlocksMessage.html @@ -0,0 +1,537 @@ + + + + + +GetBlocksMessage (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        GetBlocksMessage

        +
        public GetBlocksMessage​(long protocolVersion,
        +                        BlockLocator locator,
        +                        Sha256Hash stopHash)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

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

        getStopHash

        +
        public Sha256Hash getStopHash()
        +
      • +
      + + + +
        +
      • +

        toString

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

        bitcoinSerializeToStream

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

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/GetDataMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/GetDataMessage.html new file mode 100644 index 000000000..0209b9c93 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/GetDataMessage.html @@ -0,0 +1,489 @@ + + + + + +GetDataMessage (bitcoinj-core 0.17-SNAPSHOT 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.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        GetDataMessage

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

      Method Detail

      + + + +
        +
      • +

        read

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

        addTransaction

        +
        @Deprecated
        +public void addTransaction​(Sha256Hash hash,
        +                           boolean includeWitness)
        +
        Deprecated.
        +
      • +
      + + + +
        +
      • +

        addBlock

        +
        @Deprecated
        +public void addBlock​(Sha256Hash hash,
        +                     boolean includeWitness)
        +
        Deprecated.
        +
      • +
      + + + +
        +
      • +

        addFilteredBlock

        +
        @Deprecated
        +public void addFilteredBlock​(Sha256Hash hash)
        +
        Deprecated.
        +
      • +
      + + + +
        +
      • +

        getHashOf

        +
        public Sha256Hash getHashOf​(int i)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/GetHeadersMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/GetHeadersMessage.html new file mode 100644 index 000000000..24cfc0659 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/GetHeadersMessage.html @@ -0,0 +1,445 @@ + + + + + +GetHeadersMessage (bitcoinj-core 0.17-SNAPSHOT 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.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        GetHeadersMessage

        +
        public GetHeadersMessage​(long protocolVersion,
        +                         BlockLocator locator,
        +                         Sha256Hash stopHash)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

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

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        Compares two getheaders messages. Note that even though they are structurally identical a GetHeadersMessage + will not compare equal to a GetBlocksMessage containing the same data.
        +
        +
        Overrides:
        +
        equals in class GetBlocksMessage
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/HeadersMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/HeadersMessage.html new file mode 100644 index 000000000..cd4be0c30 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/HeadersMessage.html @@ -0,0 +1,461 @@ + + + + + +HeadersMessage (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

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

        bitcoinSerializeToStream

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

        getBlockHeaders

        +
        public java.util.List<Block> getBlockHeaders()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/InsufficientMoneyException.html b/javadoc/0.17-alpha3/org/bitcoinj/core/InsufficientMoneyException.html new file mode 100644 index 000000000..20245873b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/InsufficientMoneyException.html @@ -0,0 +1,390 @@ + + + + + +InsufficientMoneyException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class InsufficientMoneyException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.bitcoinj.core.InsufficientMoneyException
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class InsufficientMoneyException
    +extends java.lang.Exception
    +
    Thrown to indicate that you don't have enough money available to perform the requested operation.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      Coinmissing +
      Contains the number of satoshis that would have been required to complete the operation.
      +
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        missing

        +
        @Nullable
        +public final Coin missing
        +
        Contains the number of satoshis that would have been required to complete the operation.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InsufficientMoneyException

        +
        protected InsufficientMoneyException()
        +
      • +
      + + + +
        +
      • +

        InsufficientMoneyException

        +
        public InsufficientMoneyException​(Coin missing)
        +
      • +
      + + + +
        +
      • +

        InsufficientMoneyException

        +
        public InsufficientMoneyException​(Coin missing,
        +                                  java.lang.String message)
        +
      • +
      + + + +
        +
      • +

        InsufficientMoneyException

        +
        public InsufficientMoneyException​(Coin missing,
        +                                  Coin available,
        +                                  Coin outputs,
        +                                  Coin fee)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/InventoryItem.Type.html b/javadoc/0.17-alpha3/org/bitcoinj/core/InventoryItem.Type.html new file mode 100644 index 000000000..e4f424c94 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/InventoryItem.Type.html @@ -0,0 +1,501 @@ + + + + + +InventoryItem.Type (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum InventoryItem.Type

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      intcode 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static InventoryItem.TypeofCode​(int code) 
      static InventoryItem.TypevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static InventoryItem.Type[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        code

        +
        public final int code
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static InventoryItem.Type[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (InventoryItem.Type c : InventoryItem.Type.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static InventoryItem.Type valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/InventoryItem.html b/javadoc/0.17-alpha3/org/bitcoinj/core/InventoryItem.html new file mode 100644 index 000000000..d817d5a99 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/InventoryItem.html @@ -0,0 +1,451 @@ + + + + + +InventoryItem (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class InventoryItem

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.InventoryItem
    • +
    +
  • +
+
+
    +
  • +
    +
    public class InventoryItem
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        toString

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

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/InventoryMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/InventoryMessage.html new file mode 100644 index 000000000..52d45c3dc --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/InventoryMessage.html @@ -0,0 +1,569 @@ + + + + + +InventoryMessage (bitcoinj-core 0.17-SNAPSHOT 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.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        MAX_INV_SIZE

        +
        public static final int MAX_INV_SIZE
        +
        A hard coded constant in the protocol.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InventoryMessage

        +
        @Deprecated
        +protected InventoryMessage()
        +
        Deprecated.
        +
      • +
      + + + +
        +
      • +

        InventoryMessage

        +
        protected InventoryMessage​(java.util.List<InventoryItem> items)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

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

        addBlock

        +
        @Deprecated
        +public void addBlock​(Block block)
        +
        Deprecated. +
        Use a constructor or factoring
        +
        +
      • +
      + + + +
        +
      • +

        addTransaction

        +
        @Deprecated
        +public void addTransaction​(Transaction tx)
        +
        Deprecated. +
        Use a constructor or factoring
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/ListMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/ListMessage.html new file mode 100644 index 000000000..287b6969b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/ListMessage.html @@ -0,0 +1,557 @@ + + + + + +ListMessage (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ListMessage

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

        ListMessage

        +
        protected ListMessage​(java.util.List<InventoryItem> items)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        readItems

        +
        protected static java.util.List<InventoryItem> readItems​(java.nio.ByteBuffer payload)
        +                                                  throws java.nio.BufferUnderflowException,
        +                                                         ProtocolException
        +
        +
        Throws:
        +
        java.nio.BufferUnderflowException
        +
        ProtocolException
        +
        +
      • +
      + + + +
        +
      • +

        getItems

        +
        public java.util.List<InventoryItem> getItems()
        +
      • +
      + + + +
        +
      • +

        addItem

        +
        @Deprecated
        +public void addItem​(InventoryItem item)
        +
        Deprecated.
        +
      • +
      + + + +
        +
      • +

        removeItem

        +
        @Deprecated
        +public void removeItem​(int index)
        +
        Deprecated.
        +
      • +
      + + + +
        +
      • +

        bitcoinSerializeToStream

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

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/LockTime.HeightLock.html b/javadoc/0.17-alpha3/org/bitcoinj/core/LockTime.HeightLock.html new file mode 100644 index 000000000..279105b31 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/LockTime.HeightLock.html @@ -0,0 +1,320 @@ + + + + + +LockTime.HeightLock (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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 Detail

      + + + +
        +
      • +

        blockHeight

        +
        public int blockHeight()
        +
        +
        Returns:
        +
        block height as an int
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/LockTime.TimeLock.html b/javadoc/0.17-alpha3/org/bitcoinj/core/LockTime.TimeLock.html new file mode 100644 index 000000000..dbc69c34f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/LockTime.TimeLock.html @@ -0,0 +1,319 @@ + + + + + +LockTime.TimeLock (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class LockTime.TimeLock

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    LockTime
    +
    +
    +
    public static final class LockTime.TimeLock
    +extends LockTime
    +
    A LockTime instance that contains a timestamp.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        timestamp

        +
        public java.time.Instant timestamp()
        +
        +
        Returns:
        +
        timestamp in java.time format
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/LockTime.html b/javadoc/0.17-alpha3/org/bitcoinj/core/LockTime.html new file mode 100644 index 000000000..92b7a6038 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/LockTime.html @@ -0,0 +1,544 @@ + + + + + +LockTime (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class LockTime

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.LockTime
    • +
    +
  • +
+
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    LockTime.HeightLock, LockTime.TimeLock
    +
    +
    +
    public abstract class LockTime
    +extends java.lang.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 TypeClassDescription
      static class LockTime.HeightLock +
      A LockTime instance that contains a block height.
      +
      static class LockTime.TimeLock +
      A LockTime instance that contains a timestamp.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      static longTHRESHOLD +
      Raw values below this threshold specify a block height, otherwise a timestamp in seconds since epoch.
      +
      protected longvalue 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      inthashCode() 
      booleanisSet() +
      The lock time is considered to be set only if its raw value is greater than zero.
      +
      static LockTimeof​(long rawValue) +
      Wrap a raw value (as used in the Bitcoin protocol) into a lock time.
      +
      static LockTime.HeightLockofBlockHeight​(int blockHeight) +
      Wrap a block height into a lock time.
      +
      static LockTime.TimeLockofTimestamp​(java.time.Instant time) +
      Wrap a timestamp into a lock time.
      +
      longrawValue() +
      Gets the raw value as used in the Bitcoin protocol
      +
      java.lang.StringtoString() 
      static LockTimeunset() +
      Construct an unset lock time.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        value

        +
        protected final long value
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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​(java.time.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​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/MemoryPoolMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/MemoryPoolMessage.html new file mode 100644 index 000000000..26b42b5fb --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/MemoryPoolMessage.html @@ -0,0 +1,325 @@ + + + + + +MemoryPoolMessage (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        MemoryPoolMessage

        +
        public MemoryPoolMessage()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/Message.html b/javadoc/0.17-alpha3/org/bitcoinj/core/Message.html new file mode 100644 index 000000000..3e5f8dd70 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/Message.html @@ -0,0 +1,398 @@ + + + + + +Message (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface Message

+
+
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        MAX_SIZE

        +
        static final int MAX_SIZE
        +
        Maximum size of a Bitcoin P2P Message (32 MB)
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/core/MessageSerializer.html b/javadoc/0.17-alpha3/org/bitcoinj/core/MessageSerializer.html new file mode 100644 index 000000000..4146f303d --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/MessageSerializer.html @@ -0,0 +1,670 @@ + + + + + +MessageSerializer (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MessageSerializer

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.MessageSerializer
    • +
    +
  • +
+
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    BitcoinSerializer
    +
    +
    +
    public abstract class MessageSerializer
    +extends java.lang.Object
    +
    Generic interface for classes which serialize/deserialize messages. Implementing + classes should be immutable.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MessageSerializer

        +
        public MessageSerializer()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        withProtocolVersion

        +
        public abstract MessageSerializer withProtocolVersion​(int protocolVersion)
        +
        Create a new serializer with a specific protocol version. Mainly used to disable segwit when parsing transactions.
        +
      • +
      + + + +
        +
      • +

        getProtocolVersion

        +
        public abstract int getProtocolVersion()
        +
        Get the protocol version of this serializer.
        +
      • +
      + + + +
        +
      • +

        deserialize

        +
        public abstract Message deserialize​(java.nio.ByteBuffer in)
        +                             throws ProtocolException,
        +                                    java.io.IOException,
        +                                    java.lang.UnsupportedOperationException
        +
        Reads a message from the given ByteBuffer and returns it.
        +
        +
        Throws:
        +
        ProtocolException
        +
        java.io.IOException
        +
        java.lang.UnsupportedOperationException
        +
        +
      • +
      + + + +
        +
      • +

        deserializeHeader

        +
        public abstract BitcoinSerializer.BitcoinPacketHeader deserializeHeader​(java.nio.ByteBuffer in)
        +                                                                 throws ProtocolException,
        +                                                                        java.io.IOException,
        +                                                                        java.lang.UnsupportedOperationException
        +
        Deserializes only the header in case packet meta data is needed before decoding + the payload. This method assumes you have already called seekPastMagicBytes()
        +
        +
        Throws:
        +
        ProtocolException
        +
        java.io.IOException
        +
        java.lang.UnsupportedOperationException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        makeAddressV1Message

        +
        public abstract AddressV1Message makeAddressV1Message​(java.nio.ByteBuffer payload)
        +                                               throws ProtocolException,
        +                                                      java.lang.UnsupportedOperationException
        +
        Make an address message from the payload. Extension point for alternative + serialization format support.
        +
        +
        Throws:
        +
        ProtocolException
        +
        java.lang.UnsupportedOperationException
        +
        +
      • +
      + + + +
        +
      • +

        makeAddressV2Message

        +
        public abstract AddressV2Message makeAddressV2Message​(java.nio.ByteBuffer payload)
        +                                               throws ProtocolException,
        +                                                      java.lang.UnsupportedOperationException
        +
        Make an address message from the payload. Extension point for alternative + serialization format support.
        +
        +
        Throws:
        +
        ProtocolException
        +
        java.lang.UnsupportedOperationException
        +
        +
      • +
      + + + +
        +
      • +

        makeBlock

        +
        public abstract Block makeBlock​(java.nio.ByteBuffer payload)
        +                         throws ProtocolException,
        +                                java.lang.UnsupportedOperationException
        +
        Make a block from the payload. Extension point for alternative + serialization format support.
        +
        +
        Throws:
        +
        ProtocolException
        +
        java.lang.UnsupportedOperationException
        +
        +
      • +
      + + + +
        +
      • +

        makeBloomFilter

        +
        public abstract Message makeBloomFilter​(java.nio.ByteBuffer payload)
        +                                 throws ProtocolException,
        +                                        java.lang.UnsupportedOperationException
        +
        Make an filter message from the payload. Extension point for alternative + serialization format support.
        +
        +
        Throws:
        +
        ProtocolException
        +
        java.lang.UnsupportedOperationException
        +
        +
      • +
      + + + +
        +
      • +

        makeFilteredBlock

        +
        public abstract FilteredBlock makeFilteredBlock​(java.nio.ByteBuffer payload)
        +                                         throws ProtocolException,
        +                                                java.lang.UnsupportedOperationException
        +
        Make a filtered block from the payload. Extension point for alternative + serialization format support.
        +
        +
        Throws:
        +
        ProtocolException
        +
        java.lang.UnsupportedOperationException
        +
        +
      • +
      + + + +
        +
      • +

        makeInventoryMessage

        +
        public abstract InventoryMessage makeInventoryMessage​(java.nio.ByteBuffer payload)
        +                                               throws ProtocolException,
        +                                                      java.lang.UnsupportedOperationException
        +
        Make an inventory message from the payload. Extension point for alternative + serialization format support.
        +
        +
        Throws:
        +
        ProtocolException
        +
        java.lang.UnsupportedOperationException
        +
        +
      • +
      + + + +
        +
      • +

        makeTransaction

        +
        public abstract Transaction makeTransaction​(java.nio.ByteBuffer payload)
        +                                     throws ProtocolException,
        +                                            java.lang.UnsupportedOperationException
        +
        Make a transaction from the payload. Extension point for alternative + serialization format support.
        +
        +
        Throws:
        +
        java.lang.UnsupportedOperationException - if this serializer/deserializer + does not support deserialization. This can occur either because it's a dummy + serializer (i.e. for messages with no network parameters), or because + it does not support deserializing transactions.
        +
        ProtocolException
        +
        +
      • +
      + + + +
        +
      • +

        seekPastMagicBytes

        +
        public abstract void seekPastMagicBytes​(java.nio.ByteBuffer in)
        +                                 throws java.nio.BufferUnderflowException
        +
        +
        Throws:
        +
        java.nio.BufferUnderflowException
        +
        +
      • +
      + + + +
        +
      • +

        serialize

        +
        public abstract void serialize​(java.lang.String name,
        +                               byte[] message,
        +                               java.io.OutputStream out)
        +                        throws java.io.IOException,
        +                               java.lang.UnsupportedOperationException
        +
        Writes message to to the output stream.
        +
        +
        Throws:
        +
        java.lang.UnsupportedOperationException - if this serializer/deserializer + does not support serialization. This can occur either because it's a dummy + serializer (i.e. for messages with no network parameters), or because + it does not support serializing the given message.
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        serialize

        +
        public abstract void serialize​(Message message,
        +                               java.io.OutputStream out)
        +                        throws java.io.IOException,
        +                               java.lang.UnsupportedOperationException
        +
        Writes message to to the output stream.
        +
        +
        Throws:
        +
        java.lang.UnsupportedOperationException - if this serializer/deserializer + does not support serialization. This can occur either because it's a dummy + serializer (i.e. for messages with no network parameters), or because + it does not support serializing the given message.
        +
        java.io.IOException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/NetworkParameters.html b/javadoc/0.17-alpha3/org/bitcoinj/core/NetworkParameters.html new file mode 100644 index 000000000..a6ab32524 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/NetworkParameters.html @@ -0,0 +1,1935 @@ + + + + + +NetworkParameters (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class NetworkParameters

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.NetworkParameters
    • +
    +
  • +
+
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    BitcoinNetworkParams, MockAltNetworkParams
    +
    +
    +
    public abstract class NetworkParameters
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        PAYMENT_PROTOCOL_ID_MAINNET

        +
        @Deprecated
        +public static final java.lang.String PAYMENT_PROTOCOL_ID_MAINNET
        +
        Deprecated.
        +
        The string used by the payment protocol to represent the main net.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        PAYMENT_PROTOCOL_ID_TESTNET

        +
        @Deprecated
        +public static final java.lang.String PAYMENT_PROTOCOL_ID_TESTNET
        +
        Deprecated.
        +
        The string used by the payment protocol to represent the test net.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        PAYMENT_PROTOCOL_ID_SIGNET

        +
        @Deprecated
        +public static final java.lang.String PAYMENT_PROTOCOL_ID_SIGNET
        +
        Deprecated.
        +
        The string used by the payment protocol to represent signet (note that this is non-standard).
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        PAYMENT_PROTOCOL_ID_UNIT_TESTS

        +
        @Deprecated
        +public static final java.lang.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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        PAYMENT_PROTOCOL_ID_REGTEST

        +
        @Deprecated
        +public static final java.lang.String PAYMENT_PROTOCOL_ID_REGTEST
        +
        Deprecated.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        maxTarget

        +
        protected java.math.BigInteger maxTarget
        +
      • +
      + + + +
        +
      • +

        port

        +
        protected int port
        +
      • +
      + + + +
        +
      • +

        packetMagic

        +
        protected int packetMagic
        +
      • +
      + + + +
        +
      • +

        addressHeader

        +
        protected int addressHeader
        +
      • +
      + + + +
        +
      • +

        p2shHeader

        +
        protected int p2shHeader
        +
      • +
      + + + +
        +
      • +

        dumpedPrivateKeyHeader

        +
        protected int dumpedPrivateKeyHeader
        +
      • +
      + + + +
        +
      • +

        segwitAddressHrp

        +
        protected java.lang.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 java.lang.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 java.lang.String[] dnsSeeds
        +
      • +
      + + + +
        +
      • +

        addrSeeds

        +
        protected int[] addrSeeds
        +
      • +
      + + + +
        +
      • +

        checkpoints

        +
        protected java.util.Map<java.lang.Integer,​Sha256Hash> checkpoints
        +
      • +
      + + + +
        +
      • +

        defaultSerializer

        +
        protected transient volatile MessageSerializer defaultSerializer
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        BIP16_ENFORCE_TIME

        +
        public static final int 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.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        NetworkParameters

        +
        protected NetworkParameters​(Network network)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getId

        +
        public java.lang.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        fromID

        +
        @Deprecated
        +@Nullable
        +public static NetworkParameters fromID​(java.lang.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:
        +
        java.lang.IllegalArgumentException - if unknown network
        +
        +
      • +
      + + + +
        +
      • +

        fromPmtProtocolID

        +
        @Nullable
        +@Deprecated
        +public static NetworkParameters fromPmtProtocolID​(java.lang.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()
        +
      • +
      + + + + + + + +
        +
      • +

        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 java.lang.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 java.lang.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 java.math.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 java.lang.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 java.util.EnumSet<Block.VerifyFlag> getBlockVerificationFlags​(Block block,
        +                                                                     VersionTally tally,
        +                                                                     java.lang.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 java.util.EnumSet<Script.VerifyFlag> getTransactionVerificationFlags​(Block block,
        +                                                                            Transaction transaction,
        +                                                                            VersionTally tally,
        +                                                                            java.lang.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
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/NotFoundMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/NotFoundMessage.html new file mode 100644 index 000000000..c31cbe7b7 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/NotFoundMessage.html @@ -0,0 +1,449 @@ + + + + + +NotFoundMessage (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        MIN_PROTOCOL_VERSION

        +
        public static int MIN_PROTOCOL_VERSION
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NotFoundMessage

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

        NotFoundMessage

        +
        public NotFoundMessage​(java.util.List<InventoryItem> items)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

        +
        public static NotFoundMessage read​(java.nio.ByteBuffer payload)
        +                            throws java.nio.BufferUnderflowException,
        +                                   ProtocolException
        +
        Deserialize this message from a given payload.
        +
        +
        Parameters:
        +
        payload - payload to deserialize from
        +
        Returns:
        +
        read message
        +
        Throws:
        +
        java.nio.BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
        +
        ProtocolException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/PartialMerkleTree.html b/javadoc/0.17-alpha3/org/bitcoinj/core/PartialMerkleTree.html new file mode 100644 index 000000000..ba0ba5a60 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/PartialMerkleTree.html @@ -0,0 +1,564 @@ + + + + + +PartialMerkleTree (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PartialMerkleTree

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.PartialMerkleTree
    • +
    +
  • +
+
+
    +
  • +
    +
    public class PartialMerkleTree
    +extends java.lang.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 Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      PartialMerkleTree​(int origTxCount, + java.util.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.
      +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PartialMerkleTree

        +
        public PartialMerkleTree​(int origTxCount,
        +                         java.util.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 Detail

      + + + +
        +
      • +

        read

        +
        public static PartialMerkleTree read​(java.nio.ByteBuffer payload)
        +                              throws java.nio.BufferUnderflowException,
        +                                     ProtocolException
        +
        Deserialize a partial merkle tree from a given payload.
        +
        +
        Parameters:
        +
        payload - payload to deserialize from
        +
        Returns:
        +
        read message
        +
        Throws:
        +
        java.nio.BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
        +
        ProtocolException
        +
        +
      • +
      + + + +
        +
      • +

        buildFromLeaves

        +
        public static PartialMerkleTree buildFromLeaves​(byte[] includeBits,
        +                                                java.util.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 java.nio.ByteBuffer write​(java.nio.ByteBuffer buf)
        +                          throws java.nio.BufferOverflowException
        +
        Write this partial merkle tree into the given buffer.
        +
        +
        Parameters:
        +
        buf - buffer to write into
        +
        Returns:
        +
        the buffer
        +
        Throws:
        +
        java.nio.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​(java.util.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​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/Peer.html b/javadoc/0.17-alpha3/org/bitcoinj/core/Peer.html new file mode 100644 index 000000000..fab2d43de --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/Peer.html @@ -0,0 +1,1829 @@ + + + + + +Peer (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Peer

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        lock

        +
        protected final java.util.concurrent.locks.ReentrantLock lock
        +
      • +
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        addBlocksDownloadedEventListener

        +
        public void addBlocksDownloadedEventListener​(BlocksDownloadedEventListener listener)
        +
        Registers a listener that is invoked when new blocks are downloaded.
        +
      • +
      + + + +
        +
      • +

        addBlocksDownloadedEventListener

        +
        public void addBlocksDownloadedEventListener​(java.util.concurrent.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​(java.util.concurrent.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​(java.util.concurrent.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​(java.util.concurrent.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​(java.util.concurrent.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​(java.util.concurrent.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​(java.util.concurrent.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​(java.util.concurrent.Executor executor,
        +                                    AddressEventListener listener)
        +
        Registers a listener that is called when addr or addrv2 messages are received.
        +
      • +
      + + + + + + + + + + + + + + + + + + + +
        +
      • +

        removeGetDataEventListener

        +
        public boolean removeGetDataEventListener​(GetDataEventListener listener)
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        removeAddressEventListener

        +
        public boolean removeAddressEventListener​(AddressEventListener listener)
        +
      • +
      + + + +
        +
      • +

        toString

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

        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.
        +
      • +
      + + + + + + + +
        +
      • +

        processMessage

        +
        protected void processMessage​(Message m)
        +                       throws java.lang.Exception
        +
        Description copied from class: PeerSocketHandler
        +
        Called every time a message is received from the network
        +
        +
        Specified by:
        +
        processMessage in class PeerSocketHandler
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      + + + +
        +
      • +

        startFilteredBlock

        +
        protected void startFilteredBlock​(FilteredBlock m)
        +
      • +
      + + + +
        +
      • +

        processNotFoundMessage

        +
        protected void processNotFoundMessage​(NotFoundMessage m)
        +
      • +
      + + + + + + + +
        +
      • +

        processGetData

        +
        protected void processGetData​(GetDataMessage getdata)
        +
      • +
      + + + + + + + +
        +
      • +

        downloadDependencies

        +
        public ListenableCompletableFuture<java.util.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 java.util.concurrent.CompletableFuture<java.util.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)
        +
      • +
      + + + + + + + +
        +
      • +

        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.
        +
      • +
      + + + + + + + +
        +
      • +

        setFastDownloadParameters

        +
        public void setFastDownloadParameters​(boolean useFilteredBlocks,
        +                                      java.time.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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 java.util.concurrent.CompletableFuture<java.time.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 java.util.concurrent.CompletableFuture<java.time.Duration> sendPing​(long nonce)
        +
      • +
      + + + + + + + +
        +
      • +

        lastPingInterval

        +
        public java.util.Optional<java.time.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 java.util.Optional<java.time.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.

        +
      • +
      + + + + + + + +
        +
      • +

        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-alpha3/org/bitcoinj/core/PeerAddress.html b/javadoc/0.17-alpha3/org/bitcoinj/core/PeerAddress.html new file mode 100644 index 000000000..36620d603 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/PeerAddress.html @@ -0,0 +1,707 @@ + + + + + +PeerAddress (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PeerAddress

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.PeerAddress
    • +
    +
  • +
+
+
    +
  • +
    +
    public class PeerAddress
    +extends java.lang.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 Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      java.net.InetAddressgetAddr() 
      static java.net.InetAddressgetByAddress​(byte[] addrBytes) 
      java.lang.StringgetHostname() 
      intgetMessageSize​(int protocolVariant) +
      Return the size of the serialized message, using a given protocol variant.
      +
      intgetPort() 
      ServicesgetServices() 
      java.net.InetSocketAddressgetSocketAddress() 
      longgetTime() +
      Deprecated. +
      use time()
      +
      +
      inthashCode() 
      static PeerAddressinet​(java.net.InetAddress addr, + int port, + Services services, + java.time.Instant time) +
      Constructs a peer address from the given IP address, port, services and time.
      +
      static PeerAddressinet​(java.net.InetSocketAddress addr, + Services services, + java.time.Instant time) +
      Constructs a peer address from the given IP address, port, services and time.
      +
      static PeerAddresslocalhost​(NetworkParameters params) 
      static byte[]mapIntoIPv6​(byte[] ip) +
      Map given IPv4 address into IPv6 space.
      +
      static PeerAddressread​(java.nio.ByteBuffer payload, + int protocolVariant) +
      Deserialize this peer address from a given payload, using a given protocol variant.
      +
      byte[]serialize​(int protocolVariant) +
      Allocates a byte array and writes this peer address into it, using a given protocol variant.
      +
      static PeerAddresssimple​(java.net.InetAddress addr, + int port) +
      Constructs a simple peer address from the given IP address and port, but without services.
      +
      static PeerAddresssimple​(java.net.InetSocketAddress addr) +
      Constructs a simple peer address from the given socket address, but without services.
      +
      java.time.Instanttime() +
      Gets the time that the node was last seen as connected to the network.
      +
      java.net.InetSocketAddresstoSocketAddress() 
      java.lang.StringtoString() 
      java.nio.ByteBufferwrite​(java.nio.ByteBuffer buf, + int protocolVariant) +
      Write this peer address into the given buffer, using a given protocol variant.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Method Detail

      + + + +
        +
      • +

        simple

        +
        public static PeerAddress simple​(java.net.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​(java.net.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​(java.net.InetAddress addr,
        +                               int port,
        +                               Services services,
        +                               java.time.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​(java.net.InetSocketAddress addr,
        +                               Services services,
        +                               java.time.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​(java.nio.ByteBuffer payload,
        +                               int protocolVariant)
        +                        throws java.nio.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:
        +
        java.nio.BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
        +
        ProtocolException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        write

        +
        public java.nio.ByteBuffer write​(java.nio.ByteBuffer buf,
        +                                 int protocolVariant)
        +                          throws java.nio.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:
        +
        java.nio.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 java.net.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 java.lang.String getHostname()
        +
      • +
      + + + +
        +
      • +

        getAddr

        +
        public java.net.InetAddress getAddr()
        +
      • +
      + + + +
        +
      • +

        getSocketAddress

        +
        public java.net.InetSocketAddress getSocketAddress()
        +
      • +
      + + + +
        +
      • +

        getPort

        +
        public int getPort()
        +
      • +
      + + + +
        +
      • +

        getServices

        +
        public Services getServices()
        +
      • +
      + + + +
        +
      • +

        time

        +
        public java.time.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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        toSocketAddress

        +
        public java.net.InetSocketAddress toSocketAddress()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/PeerException.html b/javadoc/0.17-alpha3/org/bitcoinj/core/PeerException.html new file mode 100644 index 000000000..423d5f6fb --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/PeerException.html @@ -0,0 +1,321 @@ + + + + + +PeerException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PeerException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.bitcoinj.core.PeerException
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class PeerException
    +extends java.lang.Exception
    +
    Thrown when a problem occurs in communicating with a peer, and we should + retry.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      PeerException​(java.lang.Exception e) 
      PeerException​(java.lang.String msg) 
      PeerException​(java.lang.String msg, + java.lang.Exception e) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        PeerException

        +
        public PeerException​(java.lang.String msg)
        +
      • +
      + + + +
        +
      • +

        PeerException

        +
        public PeerException​(java.lang.Exception e)
        +
      • +
      + + + +
        +
      • +

        PeerException

        +
        public PeerException​(java.lang.String msg,
        +                     java.lang.Exception e)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/PeerFilterProvider.html b/javadoc/0.17-alpha3/org/bitcoinj/core/PeerFilterProvider.html new file mode 100644 index 000000000..43cd5773c --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/PeerFilterProvider.html @@ -0,0 +1,364 @@ + + + + + +PeerFilterProvider (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        earliestKeyCreationTime

        +
        java.time.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.
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/PeerGroup.FilterRecalculateMode.html b/javadoc/0.17-alpha3/org/bitcoinj/core/PeerGroup.FilterRecalculateMode.html new file mode 100644 index 000000000..6b5f47866 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/PeerGroup.FilterRecalculateMode.html @@ -0,0 +1,393 @@ + + + + + +PeerGroup.FilterRecalculateMode (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum PeerGroup.FilterRecalculateMode

+
+
+ +
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static PeerGroup.FilterRecalculateModevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static PeerGroup.FilterRecalculateMode[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static PeerGroup.FilterRecalculateMode[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (PeerGroup.FilterRecalculateMode c : PeerGroup.FilterRecalculateMode.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static PeerGroup.FilterRecalculateMode valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/PeerGroup.html b/javadoc/0.17-alpha3/org/bitcoinj/core/PeerGroup.html new file mode 100644 index 000000000..636d54dfe --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/PeerGroup.html @@ -0,0 +1,2717 @@ + + + + + +PeerGroup (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PeerGroup

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.PeerGroup
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    TransactionBroadcaster
    +
    +
    +
    public class PeerGroup
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        lock

        +
        protected final java.util.concurrent.locks.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:
        +
        Constant Field Values
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        executor

        +
        protected final java.util.concurrent.ScheduledExecutorService executor
        +
      • +
      + + + + + + + +
        +
      • +

        peerDiscoveredEventListeners

        +
        protected final java.util.concurrent.CopyOnWriteArrayList<ListenerRegistration<PeerDiscoveredEventListener>> peerDiscoveredEventListeners
        +
        Callbacks for events related to peer connection/disconnection
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        MAX_ADDRESSES_PER_ADDR_MESSAGE

        +
        public static final int MAX_ADDRESSES_PER_ADDR_MESSAGE
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        DEFAULT_CONNECT_TIMEOUT

        +
        public static final java.time.Duration DEFAULT_CONNECT_TIMEOUT
        +
        The default timeout between when a connection attempt begins and version message exchange completes
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        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

        +
        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 Detail

      + + + +
        +
      • +

        createPrivateExecutor

        +
        protected java.util.concurrent.ScheduledExecutorService createPrivateExecutor()
        +
      • +
      + + + +
        +
      • +

        setPeerDiscoveryTimeout

        +
        public void setPeerDiscoveryTimeout​(java.time.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.
        +
      • +
      + + + + + + + + + + + + + + + + + + + + + + + +
        +
      • +

        addChainDownloadStartedEventListener

        +
        public void addChainDownloadStartedEventListener​(java.util.concurrent.Executor executor,
        +                                                 ChainDownloadStartedEventListener listener)
        +

        Adds a listener that will be notified on the given executor when + chain download starts.

        +
      • +
      + + + + + + + +
        +
      • +

        addConnectedEventListener

        +
        public void addConnectedEventListener​(java.util.concurrent.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​(java.util.concurrent.Executor executor,
        +                                         PeerDisconnectedEventListener listener)
        +

        Adds a listener that will be notified on the given executor when + peers are disconnected from.

        +
      • +
      + + + + + + + +
        +
      • +

        addDiscoveredEventListener

        +
        public void addDiscoveredEventListener​(java.util.concurrent.Executor executor,
        +                                       PeerDiscoveredEventListener listener)
        +

        Adds a listener that will be notified on the given executor when new + peers are discovered.

        +
      • +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +
      • +

        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.
        +
      • +
      + + + + + + + +
        +
      • +

        getConnectedPeers

        +
        public java.util.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 java.util.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​(java.net.InetAddress address)
        +
        Convenience method for addAddress(PeerAddress).
        +
      • +
      + + + +
        +
      • +

        addAddress

        +
        public void addAddress​(java.net.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<java.lang.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.
        +
      • +
      + + + + + + + +
        +
      • +

        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 setFastCatchupTimeSecs(long), 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.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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.

        +
      • +
      + + + + + + + +
        +
      • +

        connectTo

        +
        @Nullable
        +public Peer connectTo​(java.net.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,
        +                         java.time.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.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        setConnectTimeout

        +
        public void setConnectTimeout​(java.time.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​(java.time.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. + +
        +
      • +
      + + + +
        +
      • +

        fastCatchupTime

        +
        public java.time.Instant fastCatchupTime()
        +
        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
        +                               java.lang.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<java.util.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<java.util.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 java.util.List<Peer> findPeersOfAtLeastVersion​(long protocolVersion)
        +
        Returns an array list of peers that implement the given protocol version or better.
        +
      • +
      + + + +
        +
      • +

        waitForPeersWithServiceMask

        +
        public ListenableCompletableFuture<java.util.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 java.util.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.
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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​(java.util.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​(java.util.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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-alpha3/org/bitcoinj/core/PeerSocketHandler.html b/javadoc/0.17-alpha3/org/bitcoinj/core/PeerSocketHandler.html new file mode 100644 index 000000000..e3981b2f8 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/PeerSocketHandler.html @@ -0,0 +1,617 @@ + + + + + +PeerSocketHandler (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PeerSocketHandler

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.PeerSocketHandler
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    StreamConnection, TimeoutHandler
    +
    +
    +
    Direct Known Subclasses:
    +
    Peer
    +
    +
    +
    public abstract class PeerSocketHandler
    +extends java.lang.Object
    +implements TimeoutHandler, StreamConnection
    +
    Handles high-level message (de)serialization for peers, acting as the bridge between the + org.bitcoinj.net classes and Peer.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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​(java.time.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<java.lang.Void> sendMessage​(Message message)
        +                                                        throws java.nio.channels.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:
        +
        java.nio.channels.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 java.lang.Exception
        +
        Called every time a message is received from the network
        +
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      + + + +
        +
      • +

        receiveBytes

        +
        public int receiveBytes​(java.nio.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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-alpha3/org/bitcoinj/core/Ping.html b/javadoc/0.17-alpha3/org/bitcoinj/core/Ping.html new file mode 100644 index 000000000..feb6cded0 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/Ping.html @@ -0,0 +1,449 @@ + + + + + +Ping (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Ping

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Message
    +
    +
    +
    public class Ping
    +extends BaseMessage
    +
    See BIP31 for details. +

    + Instances of this class are immutable.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

        +
        public static Ping read​(java.nio.ByteBuffer payload)
        +                 throws java.nio.BufferUnderflowException,
        +                        ProtocolException
        +
        Deserialize this message from a given payload.
        +
        +
        Parameters:
        +
        payload - payload to deserialize from
        +
        Returns:
        +
        read message
        +
        Throws:
        +
        java.nio.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​(java.io.OutputStream stream)
        +                              throws java.io.IOException
        +
        Description copied from class: BaseMessage
        +
        Serializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().
        +
        +
        Specified by:
        +
        bitcoinSerializeToStream in class BaseMessage
        +
        Throws:
        +
        java.io.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-alpha3/org/bitcoinj/core/Pong.html b/javadoc/0.17-alpha3/org/bitcoinj/core/Pong.html new file mode 100644 index 000000000..35de2e9f5 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/Pong.html @@ -0,0 +1,386 @@ + + + + + +Pong (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Pong

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Message
    +
    +
    +
    public class Pong
    +extends BaseMessage
    +
    See BIP31 for details. +

    + Instances of this class are immutable.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

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

        of

        +
        public static Pong of​(long nonce)
        +
        Create a pong with a nonce value.
        +
        +
        Parameters:
        +
        nonce - nonce value
        +
        Returns:
        +
        pong message
        +
        +
      • +
      + + + +
        +
      • +

        bitcoinSerializeToStream

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

        nonce

        +
        public long nonce()
        +
        Returns the nonce sent by the remote peer.
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/ProtocolException.html b/javadoc/0.17-alpha3/org/bitcoinj/core/ProtocolException.html new file mode 100644 index 000000000..e2a28a8d8 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/ProtocolException.html @@ -0,0 +1,359 @@ + + + + + +ProtocolException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ProtocolException

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ProtocolException

        +
        public ProtocolException()
        +
      • +
      + + + +
        +
      • +

        ProtocolException

        +
        public ProtocolException​(java.lang.String msg)
        +
      • +
      + + + +
        +
      • +

        ProtocolException

        +
        public ProtocolException​(java.lang.Exception e)
        +
      • +
      + + + +
        +
      • +

        ProtocolException

        +
        public ProtocolException​(java.lang.String msg,
        +                         java.lang.Exception e)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/ProtocolVersion.html b/javadoc/0.17-alpha3/org/bitcoinj/core/ProtocolVersion.html new file mode 100644 index 000000000..5dae084ff --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/ProtocolVersion.html @@ -0,0 +1,486 @@ + + + + + +ProtocolVersion (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum ProtocolVersion

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<ProtocolVersion>
    • +
    • +
        +
      • org.bitcoinj.core.ProtocolVersion
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<ProtocolVersion>
    +
    +
    +
    public enum ProtocolVersion
    +extends java.lang.Enum<ProtocolVersion>
    +
    Define important versions of the Bitcoin Protocol
    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static ProtocolVersion[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (ProtocolVersion c : ProtocolVersion.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static ProtocolVersion valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.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-alpha3/org/bitcoinj/core/PrunedException.html b/javadoc/0.17-alpha3/org/bitcoinj/core/PrunedException.html new file mode 100644 index 000000000..10a75c02b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/PrunedException.html @@ -0,0 +1,333 @@ + + + + + +PrunedException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PrunedException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.bitcoinj.core.PrunedException
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class PrunedException
    +extends java.lang.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      Sha256HashgetHash() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        PrunedException

        +
        public PrunedException​(Sha256Hash hash)
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/RejectMessage.RejectCode.html b/javadoc/0.17-alpha3/org/bitcoinj/core/RejectMessage.RejectCode.html new file mode 100644 index 000000000..e38d26972 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/RejectMessage.RejectCode.html @@ -0,0 +1,501 @@ + + + + + +RejectMessage.RejectCode (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum RejectMessage.RejectCode

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      CHECKPOINT +
      The message described a block which was invalid according to hard-coded checkpoint blocks.
      +
      DUPLICATE +
      The message was relayed multiple times or described an object which is in conflict with another.
      +
      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 +
      The messages described an object which did not have sufficient fee to be relayed further.
      +
      INVALID +
      The message described an invalid object
      +
      MALFORMED +
      The message was not able to be parsed
      +
      NONSTANDARD +
      The message described an object was not standard and was thus not accepted.
      +
      OBSOLETE +
      The message was obsolete or described an object which is obsolete (eg unsupported, old version, v1 block)
      +
      OTHER 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static RejectMessage.RejectCodevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static RejectMessage.RejectCode[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Detail

      + + + + + + + + + + + +
        +
      • +

        OBSOLETE

        +
        public static final RejectMessage.RejectCode OBSOLETE
        +
        The message was obsolete or described an object which is obsolete (eg 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.
        +
      • +
      + + + + +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static RejectMessage.RejectCode[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (RejectMessage.RejectCode c : RejectMessage.RejectCode.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static RejectMessage.RejectCode valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/RejectMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/RejectMessage.html new file mode 100644 index 000000000..d4c58b634 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/RejectMessage.html @@ -0,0 +1,654 @@ + + + + + +RejectMessage (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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 Detail

      + + + +
        +
      • +

        RejectMessage

        +
        public RejectMessage​(RejectMessage.RejectCode code,
        +                     @Nullable
        +                     Sha256Hash rejectedMessageHash,
        +                     java.lang.String rejectedMessage,
        +                     java.lang.String reason)
        +
        Constructs a reject message that fingers the object with the given hash as rejected for the given reason.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

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

        bitcoinSerializeToStream

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

        rejectedMessage

        +
        public java.lang.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 java.lang.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        code

        +
        public RejectMessage.RejectCode code()
        +
        The reason code given for why the peer rejected the message.
        +
        +
        Returns:
        +
        reject reason code
        +
        +
      • +
      + + + + + + + +
        +
      • +

        reason

        +
        public java.lang.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 java.lang.String getReasonString()
        +
        Deprecated. + +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.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 java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/RejectedTransactionException.html b/javadoc/0.17-alpha3/org/bitcoinj/core/RejectedTransactionException.html new file mode 100644 index 000000000..4a6aaf60b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/RejectedTransactionException.html @@ -0,0 +1,355 @@ + + + + + +RejectedTransactionException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class RejectedTransactionException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.bitcoinj.core.RejectedTransactionException
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class RejectedTransactionException
    +extends java.lang.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      RejectMessagegetRejectMessage() +
      Return the RejectMessage object representing the broadcast rejection.
      +
      TransactiongetTransaction() +
      Return the original Transaction object whose broadcast was rejected.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        RejectedTransactionException

        +
        public RejectedTransactionException​(Transaction tx,
        +                                    RejectMessage rejectMessage)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/core/SendAddrV2Message.html b/javadoc/0.17-alpha3/org/bitcoinj/core/SendAddrV2Message.html new file mode 100644 index 000000000..d3646f29e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/SendAddrV2Message.html @@ -0,0 +1,324 @@ + + + + + +SendAddrV2Message (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        SendAddrV2Message

        +
        public SendAddrV2Message()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/SendHeadersMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/SendHeadersMessage.html new file mode 100644 index 000000000..aba36b306 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/SendHeadersMessage.html @@ -0,0 +1,326 @@ + + + + + +SendHeadersMessage (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        SendHeadersMessage

        +
        public SendHeadersMessage()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/Services.html b/javadoc/0.17-alpha3/org/bitcoinj/core/Services.html new file mode 100644 index 000000000..20806848b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/Services.html @@ -0,0 +1,668 @@ + + + + + +Services (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Services

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.Services
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Services
    +extends java.lang.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 TypeFieldDescription
      static intBYTES +
      Number of bytes of this bitfield.
      +
      static intNODE_BITCOIN_CASH +
      A service bit used by Bitcoin-ABC to announce Bitcoin Cash nodes.
      +
      static intNODE_BLOOM +
      A service bit that denotes whether the peer supports BIP37 bloom filters or not.
      +
      static intNODE_NETWORK +
      A service bit that denotes whether the peer has a full copy of the block chain or not.
      +
      static intNODE_NETWORK_LIMITED +
      A service bit that denotes whether the peer has at least the last two days worth of blockchain (BIP159).
      +
      static intNODE_WITNESS +
      Indicates that a node can be asked for blocks and transactions including witness data.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleananyOf​(long bitmask) +
      Checks if at least one of the given node services is signaled by this bitfield.
      +
      longbits() +
      Gets the 64 bits of this bitfield, each representing a node service.
      +
      booleanequals​(java.lang.Object o) 
      booleanhas​(long bitmask) +
      Checks if given specific node services are signaled by this bitfield.
      +
      booleanhasAny() +
      Checks if this bitfield signals any node services at all.
      +
      inthashCode() 
      static Servicesnone() +
      Constructs a services bitfield representing "no node services".
      +
      static Servicesof​(long bits) +
      Wrap 64 bits, each representing a node service.
      +
      static Servicesread​(java.nio.ByteBuffer buf) +
      Construct a services bitfield by reading from the given buffer.
      +
      byte[]serialize() +
      Allocates a byte array and writes the node service bits into it.
      +
      java.lang.StringtoString() 
      java.nio.ByteBufferwrite​(java.nio.ByteBuffer buf) +
      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 Detail

      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        NODE_WITNESS

        +
        public static final int NODE_WITNESS
        +
        Indicates that a node can be asked for blocks and transactions including witness data.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        NODE_BITCOIN_CASH

        +
        public static final int NODE_BITCOIN_CASH
        +
        A service bit used by Bitcoin-ABC to announce Bitcoin Cash nodes.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        BYTES

        +
        public static final int BYTES
        +
        Number of bytes of this bitfield.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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​(java.nio.ByteBuffer buf)
        +                     throws java.nio.BufferUnderflowException
        +
        Construct a services bitfield by reading from the given buffer.
        +
        +
        Parameters:
        +
        buf - buffer to read from
        +
        Returns:
        +
        wrapped service bits
        +
        Throws:
        +
        java.nio.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 java.nio.ByteBuffer write​(java.nio.ByteBuffer buf)
        +                          throws java.nio.BufferOverflowException
        +
        Write the node service bits into the given buffer.
        +
        +
        Parameters:
        +
        buf - buffer to write into
        +
        Returns:
        +
        the buffer
        +
        Throws:
        +
        java.nio.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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/StoredBlock.html b/javadoc/0.17-alpha3/org/bitcoinj/core/StoredBlock.html new file mode 100644 index 000000000..6ae53ab6c --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/StoredBlock.html @@ -0,0 +1,600 @@ + + + + + +StoredBlock (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class StoredBlock

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.StoredBlock
    • +
    +
  • +
+
+
    +
  • +
    +
    public class StoredBlock
    +extends java.lang.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.

    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      StoredBlock​(Block header, + java.math.BigInteger chainWork, + int height) +
      Create a StoredBlock from a (header-only) Block, chain work value, and block height
      +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        COMPACT_SERIALIZED_SIZE

        +
        public static final int COMPACT_SERIALIZED_SIZE
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        StoredBlock

        +
        public StoredBlock​(Block header,
        +                   java.math.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 Detail

      + + + +
        +
      • +

        getHeader

        +
        public Block getHeader()
        +
        The block header this object wraps. The referenced block object must not have any transactions in it.
        +
      • +
      + + + +
        +
      • +

        getChainWork

        +
        public java.math.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​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        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​(java.nio.ByteBuffer buffer)
        +
        Serializes the stored block to a custom packed format. Used by CheckpointManager.
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/StoredUndoableBlock.html b/javadoc/0.17-alpha3/org/bitcoinj/core/StoredUndoableBlock.html new file mode 100644 index 000000000..1937a53fd --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/StoredUndoableBlock.html @@ -0,0 +1,419 @@ + + + + + +StoredUndoableBlock (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class StoredUndoableBlock

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.StoredUndoableBlock
    • +
    +
  • +
+
+
    +
  • +
    +
    public class StoredUndoableBlock
    +extends java.lang.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.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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 java.util.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 java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/Transaction.Purpose.html b/javadoc/0.17-alpha3/org/bitcoinj/core/Transaction.Purpose.html new file mode 100644 index 000000000..81f5b489f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/Transaction.Purpose.html @@ -0,0 +1,468 @@ + + + + + +Transaction.Purpose (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum Transaction.Purpose

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<Transaction.Purpose>
    +
    +
    +
    Enclosing class:
    +
    Transaction
    +
    +
    +
    public static enum Transaction.Purpose
    +extends java.lang.Enum<Transaction.Purpose>
    +
    This enum describes the underlying reason the transaction was created. It's useful for rendering wallet GUIs + more appropriately.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      ASSURANCE_CONTRACT_CLAIM +
      Transaction that uses up pledges to an assurance contract
      +
      ASSURANCE_CONTRACT_PLEDGE +
      Transaction that makes a pledge to an assurance contract.
      +
      ASSURANCE_CONTRACT_STUB +
      Send-to-self transaction that exists just to create an output of the right size we can pledge.
      +
      KEY_ROTATION +
      Transaction automatically created and broadcast in order to reallocate money from old to new keys.
      +
      RAISE_FEE +
      Raise fee, e.g.
      +
      UNKNOWN +
      Used when the purpose of a transaction is genuinely unknown.
      +
      USER_PAYMENT +
      Transaction created to satisfy a user payment request.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static Transaction.PurposevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static Transaction.Purpose[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        values

        +
        public static Transaction.Purpose[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (Transaction.Purpose c : Transaction.Purpose.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static Transaction.Purpose valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/Transaction.SigHash.html b/javadoc/0.17-alpha3/org/bitcoinj/core/Transaction.SigHash.html new file mode 100644 index 000000000..bdf1274f5 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/Transaction.SigHash.html @@ -0,0 +1,520 @@ + + + + + +Transaction.SigHash (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum Transaction.SigHash

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<Transaction.SigHash>
    +
    +
    +
    Enclosing class:
    +
    Transaction
    +
    +
    +
    public static enum Transaction.SigHash
    +extends java.lang.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.
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      intvalue 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      bytebyteValue() 
      static Transaction.SigHashvalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static Transaction.SigHash[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        value

        +
        public final int value
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static Transaction.SigHash[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (Transaction.SigHash c : Transaction.SigHash.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static Transaction.SigHash valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        byteValue

        +
        public byte byteValue()
        +
        +
        Returns:
        +
        the value as a byte
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/Transaction.html b/javadoc/0.17-alpha3/org/bitcoinj/core/Transaction.html new file mode 100644 index 000000000..96860fcd8 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/Transaction.html @@ -0,0 +1,2848 @@ + + + + + +Transaction (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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 Detail

      + + + +
        +
      • +

        SORT_TX_BY_UPDATE_TIME

        +
        public static final java.util.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 java.util.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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        LOCKTIME_THRESHOLD

        +
        @Deprecated
        +public static final int LOCKTIME_THRESHOLD
        +
        Deprecated. +
        use LockTime.THRESHOLD or + lockTime instanceof HeightLock or + lockTime instanceof TimeLock
        +
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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​(java.nio.ByteBuffer payload)
        +                        throws java.nio.BufferUnderflowException,
        +                               ProtocolException
        +
        Deserialize this message from a given payload.
        +
        +
        Parameters:
        +
        payload - payload to deserialize from
        +
        Returns:
        +
        read message
        +
        Throws:
        +
        java.nio.BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
        +
        ProtocolException
        +
        +
      • +
      + + + +
        +
      • +

        read

        +
        public static Transaction read​(java.nio.ByteBuffer payload,
        +                               int protocolVersion)
        +                        throws java.nio.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:
        +
        java.nio.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 java.util.Map<Sha256Hash,​java.lang.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.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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 java.util.Optional<java.time.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 java.util.Date getUpdateTime()
        +
        Deprecated. + +
        +
      • +
      + + + +
        +
      • +

        setUpdateTime

        +
        public void setUpdateTime​(java.time.Instant updateTime)
        +
        Sets the update time of this transaction.
        +
        +
        Parameters:
        +
        updateTime - update time
        +
        +
      • +
      + + + +
        +
      • +

        clearUpdateTime

        +
        public void clearUpdateTime()
        +
        Clears the update time of this transaction.
        +
      • +
      + + + + + + + +
        +
      • +

        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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.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 java.lang.String toString​(@Nullable
        +                                 AbstractBlockChain chain,
        +                                 @Nullable
        +                                 Network network,
        +                                 java.lang.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​(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

        +
        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

        +
        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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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
        +
      • +
      + + + + + + + + + + + + + + + + + + + +
        +
      • +

        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​(java.io.OutputStream stream)
        +                                 throws java.io.IOException
        +
        Description copied from class: BaseMessage
        +
        Serializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().
        +
        +
        Specified by:
        +
        bitcoinSerializeToStream in class BaseMessage
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        bitcoinSerializeToStream

        +
        protected void bitcoinSerializeToStream​(java.io.OutputStream stream,
        +                                        boolean useSegwit)
        +                                 throws java.io.IOException
        +
        Serialize according to BIP144 or the + classic format, depending on if segwit is + desired.
        +
        +
        Throws:
        +
        java.io.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 java.util.List<TransactionInput> getInputs()
        +
        Returns an unmodifiable view of all inputs.
        +
      • +
      + + + +
        +
      • +

        getOutputs

        +
        public java.util.List<TransactionOutput> getOutputs()
        +
        Returns an unmodifiable view of all outputs.
        +
      • +
      + + + +
        +
      • +

        getWalletOutputs

        +
        public java.util.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        hasConfidence

        +
        public boolean hasConfidence()
        +
        Check if the transaction has a known confidence
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.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, long) +

        +
      • +
      + + + + + + + +
        +
      • +

        isOptInFullRBF

        +
        public boolean isOptInFullRBF()
        +
        Returns whether this transaction will opt into the + full replace-by-fee semantics.
        +
      • +
      + + + +
        +
      • +

        isFinal

        +
        public boolean isFinal​(int height,
        +                       long blockTimeSeconds)
        +

        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.

        +
      • +
      + + + +
        +
      • +

        estimateUnlockTime

        +
        public java.time.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.
        +
      • +
      + + + + + + + +
        +
      • +

        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.
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        getMemo

        +
        @Nullable
        +public java.lang.String getMemo()
        +
        Returns the transaction memo.
        +
      • +
      + + + +
        +
      • +

        setMemo

        +
        public void setMemo​(java.lang.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
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionBag.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionBag.html new file mode 100644 index 000000000..d4582f88c --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionBag.html @@ -0,0 +1,334 @@ + + + + + +TransactionBag (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface TransactionBag

+
+
+
+
    +
  • +
    +
    All Known Implementing Classes:
    +
    Wallet
    +
    +
    +
    public interface TransactionBag
    +
    This interface is used to abstract the Wallet and the Transaction
    +
  • +
+
+
+
    +
  • + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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.
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionBroadcast.ProgressCallback.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionBroadcast.ProgressCallback.html new file mode 100644 index 000000000..eb088aefc --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionBroadcast.ProgressCallback.html @@ -0,0 +1,261 @@ + + + + + +TransactionBroadcast.ProgressCallback (bitcoinj-core 0.17-SNAPSHOT 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

      + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      voidonBroadcastProgress​(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 Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/core/TransactionBroadcast.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionBroadcast.html new file mode 100644 index 000000000..f0ef42854 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionBroadcast.html @@ -0,0 +1,583 @@ + + + + + +TransactionBroadcast (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class TransactionBroadcast

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.TransactionBroadcast
    • +
    +
  • +
+
+
    +
  • +
    +
    public class TransactionBroadcast
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        random

        +
        public static java.util.Random random
        +
        Used for shuffling the peers before broadcast: unit tests can replace this to make themselves deterministic.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        transaction

        +
        public Transaction transaction()
        +
      • +
      + + + + + + + +
        +
      • +

        future

        +
        @Deprecated
        +public ListenableCompletableFuture<Transaction> future()
        +
        Deprecated. +
        Use awaitRelayed() (and maybe CompletableFuture.thenApply(Function))
        +
        +
        +
        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 java.util.concurrent.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 java.util.concurrent.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 java.util.concurrent.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

        +
        public java.util.concurrent.CompletableFuture<TransactionBroadcast> 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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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
        +                                java.util.concurrent.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-alpha3/org/bitcoinj/core/TransactionBroadcaster.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionBroadcaster.html new file mode 100644 index 000000000..c3f70b478 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionBroadcaster.html @@ -0,0 +1,257 @@ + + + + + +TransactionBroadcaster (bitcoinj-core 0.17-SNAPSHOT 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.
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.ConfidenceType.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.ConfidenceType.html new file mode 100644 index 000000000..89a2fd8c8 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.ConfidenceType.html @@ -0,0 +1,464 @@ + + + + + +TransactionConfidence.ConfidenceType (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum TransactionConfidence.ConfidenceType

+
+
+ +
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      BUILDING +
      If BUILDING, then the transaction is included in the best chain and your confidence in it is increasing.
      +
      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.
      +
      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.
      +
      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.
      +
      UNKNOWN +
      If a transaction hasn't been broadcast yet, or there's no record of it, its confidence is UNKNOWN.
      +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        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, eg, 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 Detail

      + + + +
        +
      • +

        values

        +
        public static TransactionConfidence.ConfidenceType[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (TransactionConfidence.ConfidenceType c : TransactionConfidence.ConfidenceType.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static TransactionConfidence.ConfidenceType valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        getValue

        +
        public int getValue()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.Listener.ChangeReason.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.Listener.ChangeReason.html new file mode 100644 index 000000000..0bfc1542a --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.Listener.ChangeReason.html @@ -0,0 +1,410 @@ + + + + + +TransactionConfidence.Listener.ChangeReason (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum TransactionConfidence.Listener.ChangeReason

+
+
+ +
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      DEPTH +
      Occurs when a transaction that is in the best known block chain gets buried by another block.
      +
      SEEN_PEERS +
      Occurs when a pending transaction (not in the chain) was announced by another connected peers.
      +
      TYPE +
      Occurs when the type returned by TransactionConfidence.getConfidenceType() + has changed.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static TransactionConfidence.Listener.ChangeReasonvalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static TransactionConfidence.Listener.ChangeReason[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Detail

      + + + + + + + +
        +
      • +

        DEPTH

        +
        public static final TransactionConfidence.Listener.ChangeReason 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 Detail

      + + + +
        +
      • +

        values

        +
        public static TransactionConfidence.Listener.ChangeReason[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (TransactionConfidence.Listener.ChangeReason c : TransactionConfidence.Listener.ChangeReason.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static TransactionConfidence.Listener.ChangeReason valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.Listener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.Listener.html new file mode 100644 index 000000000..dd04a6e33 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.Listener.html @@ -0,0 +1,290 @@ + + + + + +TransactionConfidence.Listener (bitcoinj-core 0.17-SNAPSHOT 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-alpha3/org/bitcoinj/core/TransactionConfidence.Source.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.Source.html new file mode 100644 index 000000000..239df5a58 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.Source.html @@ -0,0 +1,405 @@ + + + + + +TransactionConfidence.Source (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum TransactionConfidence.Source

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<TransactionConfidence.Source>
    +
    +
    +
    Enclosing class:
    +
    TransactionConfidence
    +
    +
    +
    public static enum TransactionConfidence.Source
    +extends java.lang.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 Summary

      + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      NETWORK +
      We got this transaction from a network peer.
      +
      SELF +
      This transaction was created by our own wallet, so we know it's not a double spend.
      +
      UNKNOWN +
      We don't know where the transaction came from.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static TransactionConfidence.SourcevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static TransactionConfidence.Source[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static TransactionConfidence.Source[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (TransactionConfidence.Source c : TransactionConfidence.Source.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static TransactionConfidence.Source valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.html new file mode 100644 index 000000000..b3e4f69ab --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionConfidence.html @@ -0,0 +1,953 @@ + + + + + +TransactionConfidence (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class TransactionConfidence

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.TransactionConfidence
    • +
    +
  • +
+
+
    +
  • +
    +
    public class TransactionConfidence
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        TransactionConfidence

        +
        public TransactionConfidence​(Sha256Hash hash)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        addEventListener

        +
        public void addEventListener​(java.util.concurrent.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.

        +
      • +
      + + + + + + + +
        +
      • +

        getAppearedAtChainHeight

        +
        public int getAppearedAtChainHeight()
        +
        Returns the chain height at which the transaction appeared if confidence type is BUILDING.
        +
        +
        Throws:
        +
        java.lang.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getBroadcastBy

        +
        public java.util.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()
        +
      • +
      + + + +
        +
      • +

        lastBroadcastTime

        +
        public java.util.Optional<java.time.Instant> lastBroadcastTime()
        +
        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 java.util.Date getLastBroadcastedAt()
        +
        Deprecated. + +
        +
      • +
      + + + +
        +
      • +

        setLastBroadcastTime

        +
        public void setLastBroadcastTime​(java.time.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​(java.util.Date lastBroadcastedAt)
        + +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.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:
        +
        java.lang.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.
        +
      • +
      + + + + + + + +
        +
      • +

        getTransactionHash

        +
        public Sha256Hash getTransactionHash()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionInput.ConnectMode.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionInput.ConnectMode.html new file mode 100644 index 000000000..2bfc86a3f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionInput.ConnectMode.html @@ -0,0 +1,380 @@ + + + + + +TransactionInput.ConnectMode (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum TransactionInput.ConnectMode

+
+
+ +
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static TransactionInput.ConnectModevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static TransactionInput.ConnectMode[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static TransactionInput.ConnectMode[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (TransactionInput.ConnectMode c : TransactionInput.ConnectMode.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static TransactionInput.ConnectMode valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionInput.ConnectionResult.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionInput.ConnectionResult.html new file mode 100644 index 000000000..d749983fb --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionInput.ConnectionResult.html @@ -0,0 +1,393 @@ + + + + + +TransactionInput.ConnectionResult (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum TransactionInput.ConnectionResult

+
+
+ +
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static TransactionInput.ConnectionResultvalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static TransactionInput.ConnectionResult[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static TransactionInput.ConnectionResult[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (TransactionInput.ConnectionResult c : TransactionInput.ConnectionResult.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static TransactionInput.ConnectionResult valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionInput.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionInput.html new file mode 100644 index 000000000..b68832816 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionInput.html @@ -0,0 +1,1268 @@ + + + + + +TransactionInput (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class TransactionInput

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.TransactionInput
    • +
    +
  • +
+
+
    +
  • +
    +
    public class TransactionInput
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        NO_SEQUENCE

        +
        public static final long NO_SEQUENCE
        +
        Magic sequence number that indicates there is no sequence number.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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​(java.nio.ByteBuffer payload,
        +                                    Transaction parentTransaction)
        +                             throws java.nio.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:
        +
        java.nio.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 java.nio.ByteBuffer write​(java.nio.ByteBuffer buf)
        +                          throws java.nio.BufferOverflowException
        +
        Write this transaction input into the given buffer.
        +
        +
        Parameters:
        +
        buf - buffer to write into
        +
        Returns:
        +
        the buffer
        +
        Throws:
        +
        java.nio.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        connect

        +
        public TransactionInput.ConnectionResult connect​(java.util.Map<Sha256Hash,​Transaction> transactions,
        +                                                 TransactionInput.ConnectMode mode)
        +
        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

        +
        public TransactionInput.ConnectionResult connect​(Transaction transaction,
        +                                                 TransactionInput.ConnectMode mode)
        +
        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​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        toString

        +
        public java.lang.String toString()
        +
        Returns a human-readable debug string.
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionOutPoint.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionOutPoint.html new file mode 100644 index 000000000..a88b3723c --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionOutPoint.html @@ -0,0 +1,800 @@ + + + + + +TransactionOutPoint (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class TransactionOutPoint

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.TransactionOutPoint
    • +
    +
  • +
+
+
    +
  • +
    +
    public class TransactionOutPoint
    +extends java.lang.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 Detail

      + + + + + + + +
        +
      • +

        UNCONNECTED

        +
        public static final TransactionOutPoint UNCONNECTED
        +
        Special outpoint that normally marks a coinbase input. It's also used as a test dummy.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TransactionOutPoint

        +
        public TransactionOutPoint​(long index,
        +                           Transaction fromTx)
        +
      • +
      + + + +
        +
      • +

        TransactionOutPoint

        +
        public TransactionOutPoint​(long index,
        +                           Sha256Hash hash)
        +
      • +
      + + + +
        +
      • +

        TransactionOutPoint

        +
        public TransactionOutPoint​(TransactionOutput connectedOutput)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

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

        write

        +
        public java.nio.ByteBuffer write​(java.nio.ByteBuffer buf)
        +                          throws java.nio.BufferOverflowException
        +
        Write this transaction outpoint into the given buffer.
        +
        +
        Parameters:
        +
        buf - buffer to write into
        +
        Returns:
        +
        the buffer
        +
        Throws:
        +
        java.nio.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:
        +
        java.lang.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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.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​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionOutput.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionOutput.html new file mode 100644 index 000000000..7361df9de --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionOutput.html @@ -0,0 +1,1040 @@ + + + + + +TransactionOutput (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class TransactionOutput

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.TransactionOutput
    • +
    +
  • +
+
+
    +
  • +
    +
    public class TransactionOutput
    +extends java.lang.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.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

        +
        public static TransactionOutput read​(java.nio.ByteBuffer payload,
        +                                     Transaction parentTransaction)
        +                              throws java.nio.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:
        +
        java.nio.BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
        +
        ProtocolException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        write

        +
        public java.nio.ByteBuffer write​(java.nio.ByteBuffer buf)
        +                          throws java.nio.BufferOverflowException
        +
        Write this transaction output into the given buffer.
        +
        +
        Parameters:
        +
        buf - buffer to write into
        +
        Returns:
        +
        the buffer
        +
        Throws:
        +
        java.nio.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:
        +
        java.lang.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 java.lang.String toString()
        +
        Returns a human-readable debug string.
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        Returns:
        +
        debug string
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.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​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionOutputChanges.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionOutputChanges.html new file mode 100644 index 000000000..903e9dbdf --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionOutputChanges.html @@ -0,0 +1,328 @@ + + + + + +TransactionOutputChanges (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class TransactionOutputChanges

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.TransactionOutputChanges
    • +
    +
  • +
+
+
    +
  • +
    +
    public class TransactionOutputChanges
    +extends java.lang.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.

    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      TransactionOutputChanges​(java.util.List<UTXO> txOutsCreated, + java.util.List<UTXO> txOutsSpent) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        txOutsCreated

        +
        public final java.util.List<UTXO> txOutsCreated
        +
      • +
      + + + +
        +
      • +

        txOutsSpent

        +
        public final java.util.List<UTXO> txOutsSpent
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TransactionOutputChanges

        +
        public TransactionOutputChanges​(java.util.List<UTXO> txOutsCreated,
        +                                java.util.List<UTXO> txOutsSpent)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionWitness.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionWitness.html new file mode 100644 index 000000000..4b73bf5da --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TransactionWitness.html @@ -0,0 +1,577 @@ + + + + + +TransactionWitness (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class TransactionWitness

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.TransactionWitness
    • +
    +
  • +
+
+
    +
  • +
    +
    public class TransactionWitness
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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.
        +
      • +
      + + + + + + + +
        +
      • +

        of

        +
        public static TransactionWitness of​(java.util.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​(java.nio.ByteBuffer payload)
        +                               throws java.nio.BufferUnderflowException
        +
        Deserialize this transaction witness from a given payload.
        +
        +
        Parameters:
        +
        payload - payload to deserialize from
        +
        Returns:
        +
        read message
        +
        Throws:
        +
        java.nio.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 java.nio.ByteBuffer write​(java.nio.ByteBuffer buf)
        +                          throws java.nio.BufferOverflowException
        +
        Write this transaction witness into the given buffer.
        +
        +
        Parameters:
        +
        buf - buffer to write into
        +
        Returns:
        +
        the buffer
        +
        Throws:
        +
        java.nio.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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/TxConfidenceTable.html b/javadoc/0.17-alpha3/org/bitcoinj/core/TxConfidenceTable.html new file mode 100644 index 000000000..43d80f010 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/TxConfidenceTable.html @@ -0,0 +1,491 @@ + + + + + +TxConfidenceTable (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class TxConfidenceTable

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.TxConfidenceTable
    • +
    +
  • +
+
+
    +
  • +
    +
    public class TxConfidenceTable
    +extends java.lang.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, eg, 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 Detail

      + + + +
        +
      • +

        lock

        +
        protected final java.util.concurrent.locks.ReentrantLock lock
        +
      • +
      + + + +
        +
      • +

        MAX_SIZE

        +
        public static final int MAX_SIZE
        +
        The max size of a table created with the no-args constructor.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        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)
        +
        +
      • +
      + + + + + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/UTXO.html b/javadoc/0.17-alpha3/org/bitcoinj/core/UTXO.html new file mode 100644 index 000000000..fffee7551 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/UTXO.html @@ -0,0 +1,524 @@ + + + + + +UTXO (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class UTXO

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.UTXO
    • +
    +
  • +
+
+
    +
  • +
    +
    public class UTXO
    +extends java.lang.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 
      ConstructorDescription
      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, + java.lang.String address) +
      Creates a stored transaction output.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      java.lang.StringgetAddress() +
      The address of this output, can be the empty string if none was provided at construction time or was deserialized
      +
      Sha256HashgetHash() +
      The hash of the transaction which holds this output.
      +
      intgetHeight() +
      Gets the height of the block that created this output.
      +
      longgetIndex() +
      The index of this output in the transaction which holds it.
      +
      ScriptgetScript() +
      The Script object which you can use to get address, script bytes or script type.
      +
      CoingetValue() +
      The value which this Transaction output holds.
      +
      inthashCode() 
      booleanisCoinbase() +
      Gets the flag of whether this was created by a coinbase tx.
      +
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        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,
        +            java.lang.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 Detail

      + + + +
        +
      • +

        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 java.lang.String getAddress()
        +
        The address of this output, can be the empty string if none was provided at construction time or was deserialized
        +
      • +
      + + + +
        +
      • +

        toString

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

        hashCode

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

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/UTXOProvider.html b/javadoc/0.17-alpha3/org/bitcoinj/core/UTXOProvider.html new file mode 100644 index 000000000..d9572b3b9 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/UTXOProvider.html @@ -0,0 +1,317 @@ + + + + + +UTXOProvider (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        getOpenTransactionOutputs

        +
        java.util.List<UTXO> getOpenTransactionOutputs​(java.util.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-alpha3/org/bitcoinj/core/UTXOProviderException.html b/javadoc/0.17-alpha3/org/bitcoinj/core/UTXOProviderException.html new file mode 100644 index 000000000..ed3769394 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/UTXOProviderException.html @@ -0,0 +1,332 @@ + + + + + +UTXOProviderException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class UTXOProviderException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.bitcoinj.core.UTXOProviderException
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class UTXOProviderException
    +extends java.lang.Exception
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        UTXOProviderException

        +
        public UTXOProviderException()
        +
      • +
      + + + +
        +
      • +

        UTXOProviderException

        +
        public UTXOProviderException​(java.lang.String message)
        +
      • +
      + + + +
        +
      • +

        UTXOProviderException

        +
        public UTXOProviderException​(java.lang.String message,
        +                             java.lang.Throwable cause)
        +
      • +
      + + + +
        +
      • +

        UTXOProviderException

        +
        public UTXOProviderException​(java.lang.Throwable cause)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/UnknownMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/UnknownMessage.html new file mode 100644 index 000000000..afa0009ff --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/UnknownMessage.html @@ -0,0 +1,366 @@ + + + + + +UnknownMessage (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class UnknownMessage

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Message
    +
    +
    +
    public class UnknownMessage
    +extends EmptyMessage
    +

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

    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/Utils.html b/javadoc/0.17-alpha3/org/bitcoinj/core/Utils.html new file mode 100644 index 000000000..4b482dbf2 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/Utils.html @@ -0,0 +1,403 @@ + + + + + +Utils (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Utils

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.Utils
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Utils
    +extends java.lang.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 TypeFieldDescription
      static intMAX_INITIAL_ARRAY_LENGTH +
      Max initial size of variable length arrays and ArrayLists that could be attacked.
      +
      static com.google.common.base.JoinerSPACE_JOINER +
      Deprecated. +
      Use @link java.util.StringJoiner} or a direct Guava dependency
      +
      +
      static com.google.common.base.SplitterWHITESPACE_SPLITTER +
      Deprecated. +
      Use String.split(String) or a direct Guava dependency
      +
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Utils() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static java.lang.StringtoString​(java.util.List<byte[]> stack) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        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 (eg 2 billion) elements (eg transaction inputs) and + forces bitcoinj to try to allocate a huge piece of the memory resulting in OutOfMemoryError.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Utils

        +
        public Utils()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        toString

        +
        public static java.lang.String toString​(java.util.List<byte[]> stack)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.BlockVersionOutOfDate.html b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.BlockVersionOutOfDate.html new file mode 100644 index 000000000..57e442ea3 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.BlockVersionOutOfDate.html @@ -0,0 +1,322 @@ + + + + + +VerificationException.BlockVersionOutOfDate (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class VerificationException.BlockVersionOutOfDate

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BlockVersionOutOfDate

        +
        public BlockVersionOutOfDate​(long version)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.CoinbaseHeightMismatch.html b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.CoinbaseHeightMismatch.html new file mode 100644 index 000000000..8b3648dd7 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.CoinbaseHeightMismatch.html @@ -0,0 +1,322 @@ + + + + + +VerificationException.CoinbaseHeightMismatch (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class VerificationException.CoinbaseHeightMismatch

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CoinbaseHeightMismatch

        +
        public CoinbaseHeightMismatch​(java.lang.String message)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.CoinbaseScriptSizeOutOfRange.html b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.CoinbaseScriptSizeOutOfRange.html new file mode 100644 index 000000000..3e1481b42 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.CoinbaseScriptSizeOutOfRange.html @@ -0,0 +1,322 @@ + + + + + +VerificationException.CoinbaseScriptSizeOutOfRange (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class VerificationException.CoinbaseScriptSizeOutOfRange

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CoinbaseScriptSizeOutOfRange

        +
        public CoinbaseScriptSizeOutOfRange()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.DuplicatedOutPoint.html b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.DuplicatedOutPoint.html new file mode 100644 index 000000000..13333174a --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.DuplicatedOutPoint.html @@ -0,0 +1,322 @@ + + + + + +VerificationException.DuplicatedOutPoint (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class VerificationException.DuplicatedOutPoint

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        DuplicatedOutPoint

        +
        public DuplicatedOutPoint()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.EmptyInputsOrOutputs.html b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.EmptyInputsOrOutputs.html new file mode 100644 index 000000000..ed195a490 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.EmptyInputsOrOutputs.html @@ -0,0 +1,322 @@ + + + + + +VerificationException.EmptyInputsOrOutputs (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class VerificationException.EmptyInputsOrOutputs

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        EmptyInputsOrOutputs

        +
        public EmptyInputsOrOutputs()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.ExcessiveValue.html b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.ExcessiveValue.html new file mode 100644 index 000000000..fcd8b936f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.ExcessiveValue.html @@ -0,0 +1,322 @@ + + + + + +VerificationException.ExcessiveValue (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class VerificationException.ExcessiveValue

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ExcessiveValue

        +
        public ExcessiveValue()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.LargerThanMaxBlockSize.html b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.LargerThanMaxBlockSize.html new file mode 100644 index 000000000..0e0831442 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.LargerThanMaxBlockSize.html @@ -0,0 +1,322 @@ + + + + + +VerificationException.LargerThanMaxBlockSize (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class VerificationException.LargerThanMaxBlockSize

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        LargerThanMaxBlockSize

        +
        public LargerThanMaxBlockSize()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.NegativeValueOutput.html b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.NegativeValueOutput.html new file mode 100644 index 000000000..562dacd8f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.NegativeValueOutput.html @@ -0,0 +1,322 @@ + + + + + +VerificationException.NegativeValueOutput (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class VerificationException.NegativeValueOutput

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NegativeValueOutput

        +
        public NegativeValueOutput()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.NoncanonicalSignature.html b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.NoncanonicalSignature.html new file mode 100644 index 000000000..a35ee9462 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.NoncanonicalSignature.html @@ -0,0 +1,322 @@ + + + + + +VerificationException.NoncanonicalSignature (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class VerificationException.NoncanonicalSignature

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NoncanonicalSignature

        +
        public NoncanonicalSignature()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.UnexpectedCoinbaseInput.html b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.UnexpectedCoinbaseInput.html new file mode 100644 index 000000000..f0875d74e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.UnexpectedCoinbaseInput.html @@ -0,0 +1,322 @@ + + + + + +VerificationException.UnexpectedCoinbaseInput (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class VerificationException.UnexpectedCoinbaseInput

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        UnexpectedCoinbaseInput

        +
        public UnexpectedCoinbaseInput()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.html b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.html new file mode 100644 index 000000000..5350a7453 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/VerificationException.html @@ -0,0 +1,409 @@ + + + + + +VerificationException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class VerificationException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • java.lang.RuntimeException
        • +
        • +
            +
          • org.bitcoinj.core.VerificationException
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+ +
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        VerificationException

        +
        public VerificationException()
        +
      • +
      + + + +
        +
      • +

        VerificationException

        +
        public VerificationException​(java.lang.String msg)
        +
      • +
      + + + +
        +
      • +

        VerificationException

        +
        public VerificationException​(java.lang.Exception e)
        +
      • +
      + + + +
        +
      • +

        VerificationException

        +
        public VerificationException​(java.lang.String msg,
        +                             java.lang.Throwable t)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/VersionAck.html b/javadoc/0.17-alpha3/org/bitcoinj/core/VersionAck.html new file mode 100644 index 000000000..37a44b94d --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/VersionAck.html @@ -0,0 +1,322 @@ + + + + + +VersionAck (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        VersionAck

        +
        public VersionAck()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/VersionMessage.html b/javadoc/0.17-alpha3/org/bitcoinj/core/VersionMessage.html new file mode 100644 index 000000000..810085915 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/VersionMessage.html @@ -0,0 +1,926 @@ + + + + + +VersionMessage (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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 Detail

      + + + +
        +
      • +

        BITCOINJ_VERSION

        +
        public static final java.lang.String BITCOINJ_VERSION
        +
        The version of this library release, as a string.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        LIBRARY_SUBVER

        +
        public static final java.lang.String LIBRARY_SUBVER
        +
        The value that is prepended to the subVer field of this application.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + + + + + + + + + + + + + + + + + + + + + +
        +
      • +

        clientVersion

        +
        public int clientVersion
        +
        The version number of the protocol spoken.
        +
      • +
      + + + +
        +
      • +

        localServices

        +
        public Services localServices
        +
        Flags defining what optional services are supported.
        +
      • +
      + + + +
        +
      • +

        time

        +
        public java.time.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 java.net.InetSocketAddress receivingAddr
        +
        The network address of the receiving node as perceived by the transmitting node
        +
      • +
      + + + +
        +
      • +

        subVer

        +
        public java.lang.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 Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        read

        +
        public static VersionMessage read​(java.nio.ByteBuffer payload)
        +                           throws java.nio.BufferUnderflowException,
        +                                  ProtocolException
        +
        Deserialize this message from a given payload.
        +
        +
        Parameters:
        +
        payload - payload to deserialize from
        +
        Returns:
        +
        read message
        +
        Throws:
        +
        java.nio.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​(java.io.OutputStream buf)
        +                              throws java.io.IOException
        +
        Description copied from class: BaseMessage
        +
        Serializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().
        +
        +
        Specified by:
        +
        bitcoinSerializeToStream in class BaseMessage
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        toString

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

        appendToSubVer

        +
        public void appendToSubVer​(java.lang.String name,
        +                           java.lang.String version,
        +                           @Nullable
        +                           java.lang.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:
        +
        java.lang.IllegalArgumentException - if name, version or comments contains invalid characters.
        +
        +
      • +
      + + + +
        +
      • +

        isPingPongSupported

        +
        @Deprecated
        +public boolean isPingPongSupported()
        +
        Deprecated. +
        just assume Ping and Pong are supported
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/AddressEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/AddressEventListener.html new file mode 100644 index 000000000..298be44ed --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/AddressEventListener.html @@ -0,0 +1,261 @@ + + + + + +AddressEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface AddressEventListener

+
+
+
+
    +
  • +
    +
    public interface AddressEventListener
    +

    Implementors can listen to addresses being received from remote peers.

    +
  • +
+
+
+
    +
  • + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/core/listeners/BlockchainDownloadEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/BlockchainDownloadEventListener.html new file mode 100644 index 000000000..a79ad5f43 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/BlockchainDownloadEventListener.html @@ -0,0 +1,229 @@ + + + + + +BlockchainDownloadEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface BlockchainDownloadEventListener

+
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/BlocksDownloadedEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/BlocksDownloadedEventListener.html new file mode 100644 index 000000000..3068e6d7e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/BlocksDownloadedEventListener.html @@ -0,0 +1,279 @@ + + + + + +BlocksDownloadedEventListener (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/core/listeners/ChainDownloadStartedEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/ChainDownloadStartedEventListener.html new file mode 100644 index 000000000..63a7a728e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/ChainDownloadStartedEventListener.html @@ -0,0 +1,269 @@ + + + + + +ChainDownloadStartedEventListener (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/core/listeners/DownloadProgressTracker.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/DownloadProgressTracker.html new file mode 100644 index 000000000..e166f7d96 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/DownloadProgressTracker.html @@ -0,0 +1,467 @@ + + + + + +DownloadProgressTracker (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DownloadProgressTracker

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.core.listeners.DownloadProgressTracker
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidawait() +
      Wait for the chain to be downloaded.
      +
      protected voiddoneDownload() +
      Called when we are done downloading the block chain.
      +
      ListenableCompletableFuture<java.lang.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.
      +
      voidonBlocksDownloaded​(Peer peer, + Block block, + FilteredBlock filteredBlock, + int blocksLeft) +
      Called on a Peer thread when a block is received.
      +
      voidonChainDownloadStarted​(Peer peer, + int blocksLeft) +
      Called when a download is started with the initial number of blocks to be downloaded.
      +
      protected voidprogress​(double pct, + int blocksSoFar, + java.time.Instant time) +
      Called when download progress is made.
      +
      protected voidstartDownload​(int blocks) +
      Called when download is initiated.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        DownloadProgressTracker

        +
        public DownloadProgressTracker()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        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,
        +                        java.time.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 java.lang.InterruptedException
        +
        Wait for the chain to be downloaded.
        +
        +
        Throws:
        +
        java.lang.InterruptedException
        +
        +
      • +
      + + + +
        +
      • +

        getFuture

        +
        public ListenableCompletableFuture<java.lang.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-alpha3/org/bitcoinj/core/listeners/GetDataEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/GetDataEventListener.html new file mode 100644 index 000000000..ba33419c1 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/GetDataEventListener.html @@ -0,0 +1,265 @@ + + + + + +GetDataEventListener (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        getData

        +
        @Nullable
        +java.util.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-alpha3/org/bitcoinj/core/listeners/NewBestBlockListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/NewBestBlockListener.html new file mode 100644 index 000000000..172998bcd --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/NewBestBlockListener.html @@ -0,0 +1,271 @@ + + + + + +NewBestBlockListener (bitcoinj-core 0.17-SNAPSHOT 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-alpha3/org/bitcoinj/core/listeners/OnTransactionBroadcastListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/OnTransactionBroadcastListener.html new file mode 100644 index 000000000..68892292c --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/OnTransactionBroadcastListener.html @@ -0,0 +1,254 @@ + + + + + +OnTransactionBroadcastListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface OnTransactionBroadcastListener

+
+
+
+
    +
  • +
    +
    public interface OnTransactionBroadcastListener
    +
    Called when a new transaction is broadcast over the network.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onTransaction

        +
        void onTransaction​(Peer peer,
        +                   Transaction t)
        +
        Called when a new transaction is broadcast over the network.
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PeerConnectedEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PeerConnectedEventListener.html new file mode 100644 index 000000000..e4d21b27f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PeerConnectedEventListener.html @@ -0,0 +1,260 @@ + + + + + +PeerConnectedEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface PeerConnectedEventListener

+
+
+
+
    +
  • +
    +
    public interface PeerConnectedEventListener
    +

    Implementors can listen to events indicating a new peer connecting.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/core/listeners/PeerDataEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PeerDataEventListener.html new file mode 100644 index 000000000..ce98a3048 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PeerDataEventListener.html @@ -0,0 +1,244 @@ + + + + + +PeerDataEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface PeerDataEventListener

+
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PeerDisconnectedEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PeerDisconnectedEventListener.html new file mode 100644 index 000000000..20a421125 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PeerDisconnectedEventListener.html @@ -0,0 +1,262 @@ + + + + + +PeerDisconnectedEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface PeerDisconnectedEventListener

+
+
+
+
    +
  • +
    +
    public interface PeerDisconnectedEventListener
    +

    Implementors can listen to events indicating a peer disconnecting.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/core/listeners/PeerDiscoveredEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PeerDiscoveredEventListener.html new file mode 100644 index 000000000..8014f894f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PeerDiscoveredEventListener.html @@ -0,0 +1,258 @@ + + + + + +PeerDiscoveredEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface PeerDiscoveredEventListener

+
+
+
+
    +
  • +
    +
    public interface PeerDiscoveredEventListener
    +

    Implementors can listen to events for peers being discovered.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onPeersDiscovered

        +
        void onPeersDiscovered​(java.util.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-alpha3/org/bitcoinj/core/listeners/PreMessageReceivedEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PreMessageReceivedEventListener.html new file mode 100644 index 000000000..f12fd96ce --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/PreMessageReceivedEventListener.html @@ -0,0 +1,266 @@ + + + + + +PreMessageReceivedEventListener (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/core/listeners/ReorganizeListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/ReorganizeListener.html new file mode 100644 index 000000000..5de64a330 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/ReorganizeListener.html @@ -0,0 +1,272 @@ + + + + + +ReorganizeListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface ReorganizeListener

+
+
+
+
    +
  • +
    +
    All Known Implementing Classes:
    +
    NativeBlockChainListener, Wallet
    +
    +
    +
    public interface ReorganizeListener
    +
    Listener interface for when the best chain has changed.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        reorganize

        +
        void reorganize​(StoredBlock splitPoint,
        +                java.util.List<StoredBlock> oldBlocks,
        +                java.util.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-alpha3/org/bitcoinj/core/listeners/TransactionConfidenceEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/TransactionConfidenceEventListener.html new file mode 100644 index 000000000..0ff65b6d4 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/TransactionConfidenceEventListener.html @@ -0,0 +1,281 @@ + + + + + +TransactionConfidenceEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface TransactionConfidenceEventListener

+
+
+
+
    +
  • +
    +
    All Known Implementing Classes:
    +
    NativeTransactionConfidenceEventListener
    +
    +
    +
    public interface TransactionConfidenceEventListener
    +
    Implementors are called when confidence of a transaction changes.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/core/listeners/TransactionReceivedInBlockListener.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/TransactionReceivedInBlockListener.html new file mode 100644 index 000000000..5c88476d6 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/TransactionReceivedInBlockListener.html @@ -0,0 +1,322 @@ + + + + + +TransactionReceivedInBlockListener (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        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 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-alpha3/org/bitcoinj/core/listeners/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/package-summary.html new file mode 100644 index 000000000..b95077656 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/package-summary.html @@ -0,0 +1,277 @@ + + + + + +org.bitcoinj.core.listeners (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.core.listeners

+
+
+ +
+
+
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/package-tree.html new file mode 100644 index 000000000..e7dcf2dc9 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/listeners/package-tree.html @@ -0,0 +1,197 @@ + + + + + +org.bitcoinj.core.listeners Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.core.listeners

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/core/package-summary.html new file mode 100644 index 000000000..ebcbaf87f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/package-summary.html @@ -0,0 +1,771 @@ + + + + + +org.bitcoinj.core (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

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.
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Interface Summary 
    InterfaceDescription
    Message +
    A Message is a data structure that can be serialized/deserialized using the Bitcoin serialization format.
    +
    PeerFilterProvider +
    An interface which provides the information required to properly filter data downloaded from Peers.
    +
    TransactionBag +
    This interface is used to abstract the Wallet and the Transaction
    +
    TransactionBroadcast.ProgressCallback +
    An interface for receiving progress information on the propagation of the tx, from 0.0 to 1.0
    +
    TransactionBroadcaster +
    A general interface which declares the ability to broadcast transactions.
    +
    TransactionConfidence.Listener +
    A confidence listener is informed when the level of TransactionConfidence is updated by something, like + for example a Wallet.
    +
    UTXOProvider +
    A UTXOProvider encapsulates functionality for returning unspent transaction outputs, + for use by the wallet or other code that crafts spends.
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    AbstractBlockChain +
    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.
    +
    AddressMessage +
    Abstract superclass for address messages on the P2P network, which contain network addresses of other peers.
    +
    AddressV1Message +
    Represents an "addr" message on the P2P network, which contains broadcast IP addresses of other peers.
    +
    AddressV2Message +
    Represents an "addrv2" message on the P2P network, which contains broadcast addresses of other peers.
    +
    BaseMessage +
    A Message is a data structure that can be serialized/deserialized using the Bitcoin serialization format.
    +
    BitcoinSerializer +
    Methods to serialize and de-serialize messages to the Bitcoin network format as defined in + the protocol specification.
    +
    BitcoinSerializer.BitcoinPacketHeader 
    Block +
    A block is a group of transactions, and is one of the fundamental data structures of the Bitcoin system.
    +
    BlockChain +
    A BlockChain implements the simplified payment verification mode of the Bitcoin protocol.
    +
    BlockLocator +
    Represents Block Locator in GetBlocks and GetHeaders messages
    +
    BloomFilter +
    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.
    +
    CheckpointManager +
    Vends hard-coded StoredBlocks for blocks throughout the chain.
    +
    Context +
    The Context object holds various objects and pieces of configuration that are scoped to a specific instantiation of + bitcoinj for a specific network.
    +
    EmptyMessage +
    Parent class for header only messages that don't have a payload.
    +
    FeeFilterMessage +
    Represents a "feefilter" message on the P2P network, which instructs a peer to filter transaction invs for + transactions that fall below the feerate provided.
    +
    FilteredBlock +
    A FilteredBlock is used to relay a block with its transactions filtered using a BloomFilter.
    +
    FullPrunedBlockChain +
    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.
    +
    GetAddrMessage +
    Represents the "getaddr" P2P protocol message, which requests network AddressMessages from a peer.
    +
    GetBlocksMessage +
    Represents the "getblocks" P2P network message, which requests the hashes of the parts of the block chain we're + missing.
    +
    GetDataMessage +
    Represents the "getdata" P2P network message, which requests the contents of blocks or transactions given their + hashes.
    +
    GetHeadersMessage +
    The "getheaders" command is structurally identical to "getblocks", but has different meaning.
    +
    HeadersMessage +
    A protocol message that contains a repeated series of block headers, sent in response to the "getheaders" command.
    +
    InventoryItem 
    InventoryMessage +
    Represents the "inv" P2P network message.
    +
    ListMessage +
    Abstract superclass of classes with list based payload, ie InventoryMessage and GetDataMessage.
    +
    LockTime +
    Wrapper for transaction lock time, specified either as a block height LockTime.HeightLock or as a timestamp + LockTime.TimeLock (in seconds since epoch).
    +
    LockTime.HeightLock +
    A LockTime instance that contains a block height.
    +
    LockTime.TimeLock +
    A LockTime instance that contains a timestamp.
    +
    MemoryPoolMessage +
    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.
    +
    MessageSerializer +
    Generic interface for classes which serialize/deserialize messages.
    +
    NetworkParameters +
    NetworkParameters contains the data needed for working with an instantiation of a Bitcoin chain.
    +
    NotFoundMessage +
    Sent by a peer when a getdata request doesn't find the requested data in the mempool.
    +
    PartialMerkleTree +
    A data structure that contains proofs of block inclusion for one or more transactions, in an efficient manner.
    +
    Peer +
    A Peer handles the high level communication with a Bitcoin node, extending a PeerSocketHandler which + handles low-level message (de)serialization.
    +
    PeerAddress +
    A PeerAddress holds an IP address and port number representing the network location of + a peer in the Bitcoin P2P network.
    +
    PeerGroup +
    Runs a set of connections to the P2P network, brings up connections to replace disconnected nodes and manages + the interaction between them all.
    +
    PeerSocketHandler +
    Handles high-level message (de)serialization for peers, acting as the bridge between the + org.bitcoinj.net classes and Peer.
    +
    Ping +
    See BIP31 for details.
    +
    Pong +
    See BIP31 for details.
    +
    RejectMessage +
    A message sent by nodes when a message we sent was rejected (ie a transaction had too little fee/was invalid/etc).
    +
    SendAddrV2Message +
    Represents the sendaddrv2 P2P protocol message, which indicates that a node can understand and prefers + to receive addrv2 messages instead of addr messages.
    +
    SendHeadersMessage +
    + A new message, "sendheaders", which indicates that a node prefers to receive new block announcements via a "headers" + message rather than an "inv".
    +
    Services +
    Wrapper for services bitfield used in various messages of the Bitcoin protocol.
    +
    StoredBlock +
    Wraps a Block object with extra data that can be derived from the block chain but is slow or inconvenient to + calculate.
    +
    StoredUndoableBlock +
    Contains minimal data necessary to disconnect/connect the transactions + in the stored block at will.
    +
    Transaction +
    A transaction represents the movement of coins from some addresses to some other addresses.
    +
    TransactionBroadcast +
    Represents a single transaction broadcast that we are performing.
    +
    TransactionConfidence +
    A TransactionConfidence object tracks data you can use to make a confidence decision about a transaction.
    +
    TransactionInput +
    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.
    +
    TransactionOutPoint +
    This message is a reference or pointer to an output of a different transaction.
    +
    TransactionOutput +
    A TransactionOutput message contains a scriptPubKey that controls who is able to spend its value.
    +
    TransactionOutputChanges +
    TransactionOutputChanges represents a delta to the set of unspent outputs.
    +
    TransactionWitness 
    TxConfidenceTable +
    Tracks transactions that are being announced across the network.
    +
    UnknownMessage +
    Instances of this class are not safe for use by multiple threads.
    +
    Utils +
    A collection of various utility methods that are helpful for working with the Bitcoin protocol.
    +
    UTXO +
    A UTXO message contains the information necessary to check a spending transaction.
    +
    VersionAck +
    The verack message, sent by a client accepting the version message they + received from their peer.
    +
    VersionMessage +
    A VersionMessage holds information exchanged during connection setup with another peer.
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Enum Summary 
    EnumDescription
    AbstractBlockChain.NewBlockType +
    Indicates whether new Block was on the best chain or not
    +
    Block.VerifyFlag +
    Flags used to control which elements of block validation are done on + received blocks.
    +
    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)
    +
    InventoryItem.Type 
    PeerGroup.FilterRecalculateMode 
    ProtocolVersion +
    Define important versions of the Bitcoin Protocol
    +
    RejectMessage.RejectCode 
    Transaction.Purpose +
    This enum describes the underlying reason the transaction was created.
    +
    Transaction.SigHash +
    These constants are a part of a scriptSig signature on the inputs.
    +
    TransactionConfidence.ConfidenceType +
    Describes the state of the transaction in general terms.
    +
    TransactionConfidence.Listener.ChangeReason +
    An enum that describes why a transaction confidence listener is being invoked (i.e.
    +
    TransactionConfidence.Source +
    Information about where the transaction was first seen (network, sent direct from peer, created by ourselves).
    +
    TransactionInput.ConnectionResult 
    TransactionInput.ConnectMode 
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Exception Summary 
    ExceptionDescription
    InsufficientMoneyException +
    Thrown to indicate that you don't have enough money available to perform the requested operation.
    +
    PeerException +
    Thrown when a problem occurs in communicating with a peer, and we should + retry.
    +
    ProtocolException 
    PrunedException +
    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.
    +
    RejectedTransactionException +
    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.
    +
    UTXOProviderException 
    VerificationException 
    VerificationException.BlockVersionOutOfDate 
    VerificationException.CoinbaseHeightMismatch 
    VerificationException.CoinbaseScriptSizeOutOfRange 
    VerificationException.DuplicatedOutPoint 
    VerificationException.EmptyInputsOrOutputs 
    VerificationException.ExcessiveValue 
    VerificationException.LargerThanMaxBlockSize 
    VerificationException.NegativeValueOutput 
    VerificationException.NoncanonicalSignature 
    VerificationException.UnexpectedCoinbaseInput 
    +
  • +
+
+
+
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/core/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/core/package-tree.html new file mode 100644 index 000000000..7c0cb7428 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/core/package-tree.html @@ -0,0 +1,320 @@ + + + + + +org.bitcoinj.core Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.core

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Hierarchy

+ +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/AesKey.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/AesKey.html new file mode 100644 index 000000000..ca695bbc5 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/AesKey.html @@ -0,0 +1,420 @@ + + + + + +AesKey (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class AesKey

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.lang.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()

    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      AesKey​(byte[] keyBytes) +
      Wrapper for a byte[] containing an AES Key
      +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AesKey

        +
        public AesKey​(byte[] keyBytes)
        +
        Wrapper for a byte[] containing an AES Key
        +
        +
        Parameters:
        +
        keyBytes - implementation-dependent AES Key bytes
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/crypto/BIP38PrivateKey.BadPassphraseException.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/BIP38PrivateKey.BadPassphraseException.html new file mode 100644 index 000000000..987796aff --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/BIP38PrivateKey.BadPassphraseException.html @@ -0,0 +1,295 @@ + + + + + +BIP38PrivateKey.BadPassphraseException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BIP38PrivateKey.BadPassphraseException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.bitcoinj.crypto.BIP38PrivateKey.BadPassphraseException
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    Enclosing class:
    +
    BIP38PrivateKey
    +
    +
    +
    public static final class BIP38PrivateKey.BadPassphraseException
    +extends java.lang.Exception
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        BadPassphraseException

        +
        public BadPassphraseException()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/BIP38PrivateKey.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/BIP38PrivateKey.html new file mode 100644 index 000000000..a36591c1e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/BIP38PrivateKey.html @@ -0,0 +1,510 @@ + + + + + +BIP38PrivateKey (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BIP38PrivateKey

+
+
+ +
+
    +
  • +
    +
    public class BIP38PrivateKey
    +extends EncodedPrivateKey
    +
    Implementation of BIP 38 + passphrase-protected private keys. Currently, only decryption is supported.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        fromBase58

        +
        public static BIP38PrivateKey fromBase58​(Network network,
        +                                         java.lang.String base58)
        +                                  throws AddressFormatException
        +
        Construct a password-protected private key from its Base58 representation.
        +
        +
        Parameters:
        +
        network - The network of the chain that the key is for.
        +
        base58 - The textual form of the password-protected private key.
        +
        Throws:
        +
        AddressFormatException - if the given base58 doesn't parse or the checksum is invalid
        +
        +
      • +
      + + + +
        +
      • +

        fromBase58

        +
        @Deprecated
        +public static BIP38PrivateKey fromBase58​(NetworkParameters params,
        +                                         java.lang.String base58)
        +                                  throws AddressFormatException
        +
        Deprecated. + +
        +
        Construct a password-protected private key from its Base58 representation.
        +
        +
        Parameters:
        +
        params - The network of the chain that the key is for.
        +
        base58 - The textual form of the password-protected private key.
        +
        Throws:
        +
        AddressFormatException - if the given base58 doesn't parse or the checksum is invalid
        +
        +
      • +
      + + + +
        +
      • +

        toBase58

        +
        public java.lang.String toBase58()
        +
        Returns the base58-encoded textual form, including version and checksum bytes.
        +
        +
        Returns:
        +
        textual form
        +
        +
      • +
      + + + + + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/ChildNumber.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/ChildNumber.html new file mode 100644 index 000000000..a51fbe4a1 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/ChildNumber.html @@ -0,0 +1,671 @@ + + + + + +ChildNumber (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ChildNumber

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.ChildNumber
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.lang.Comparable<ChildNumber>
    +
    +
    +
    public class ChildNumber
    +extends java.lang.Object
    +implements java.lang.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 Detail

      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + + + + + +
        +
      • +

        ZERO_HARDENED

        +
        public static final ChildNumber ZERO_HARDENED
        +
      • +
      + + + + + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        ChildNumber

        +
        public ChildNumber​(int childNumber,
        +                   boolean isHardened)
        +
      • +
      + + + +
        +
      • +

        ChildNumber

        +
        public ChildNumber​(int i)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        compareTo

        +
        public int compareTo​(ChildNumber other)
        +
        +
        Specified by:
        +
        compareTo in interface java.lang.Comparable<ChildNumber>
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/DeterministicHierarchy.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/DeterministicHierarchy.html new file mode 100644 index 000000000..518451f49 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/DeterministicHierarchy.html @@ -0,0 +1,538 @@ + + + + + +DeterministicHierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DeterministicHierarchy

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.DeterministicHierarchy
    • +
    +
  • +
+
+
    +
  • +
    +
    public class DeterministicHierarchy
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        BIP32_STANDARDISATION_TIME

        +
        public static final java.time.Instant BIP32_STANDARDISATION_TIME
        +
      • +
      + + + +
        +
      • +

        BIP32_STANDARDISATION_TIME_SECS

        +
        @Deprecated
        +public static final int BIP32_STANDARDISATION_TIME_SECS
        +
        Deprecated. + +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        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​(java.util.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​(java.util.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:
        +
        java.lang.IllegalArgumentException - if create is false and the path was not found.
        +
        +
      • +
      + + + +
        +
      • +

        deriveNextChild

        +
        public DeterministicKey deriveNextChild​(java.util.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:
        +
        java.lang.IllegalArgumentException - if the parent doesn't exist and createParent is false.
        +
        +
      • +
      + + + +
        +
      • +

        getNumChildren

        +
        public int getNumChildren​(HDPath path)
        +
      • +
      + + + +
        +
      • +

        deriveChild

        +
        public DeterministicKey deriveChild​(java.util.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:
        +
        java.lang.IllegalArgumentException - if the parent doesn't exist and createParent is false.
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/DeterministicKey.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/DeterministicKey.html new file mode 100644 index 000000000..fa5c95d6d --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/DeterministicKey.html @@ -0,0 +1,1715 @@ + + + + + +DeterministicKey (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DeterministicKey

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        CHILDNUM_ORDER

        +
        public static final java.util.Comparator<ECKey> CHILDNUM_ORDER
        +
        Sorts deterministic keys in the order of their child number. That's usually the order used to derive them.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        DeterministicKey

        +
        public DeterministicKey​(java.util.List<ChildNumber> childNumberPath,
        +                        byte[] chainCode,
        +                        LazyECPoint publicAsPoint,
        +                        @Nullable
        +                        java.math.BigInteger priv,
        +                        @Nullable
        +                        DeterministicKey parent)
        +
        Constructs a key from its components. This is not normally something you should use.
        +
      • +
      + + + +
        +
      • +

        DeterministicKey

        +
        public DeterministicKey​(java.util.List<ChildNumber> childNumberPath,
        +                        byte[] chainCode,
        +                        org.bouncycastle.math.ec.ECPoint publicAsPoint,
        +                        boolean compressed,
        +                        @Nullable
        +                        java.math.BigInteger priv,
        +                        @Nullable
        +                        DeterministicKey parent)
        +
      • +
      + + + +
        +
      • +

        DeterministicKey

        +
        public DeterministicKey​(HDPath hdPath,
        +                        byte[] chainCode,
        +                        java.math.BigInteger priv,
        +                        @Nullable
        +                        DeterministicKey parent)
        +
        Constructs a key from its components. This is not normally something you should use.
        +
      • +
      + + + +
        +
      • +

        DeterministicKey

        +
        public DeterministicKey​(java.util.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​(java.util.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​(java.util.List<ChildNumber> childNumberPath,
        +                        byte[] chainCode,
        +                        java.math.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.
        +
      • +
      + + + + +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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 java.lang.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().
        +
      • +
      + + + + + + + +
        +
      • +

        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:
        +
        java.lang.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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 java.math.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:
        +
        java.lang.IllegalStateException - if the parents are encrypted or a watching chain.
        +
        +
      • +
      + + + +
        +
      • +

        serializePubB58

        +
        public java.lang.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:
        +
        Why does importmulti not support zpub and ypub?
        +
        +
      • +
      + + + + + + + +
        +
      • +

        serializePrivB58

        +
        public java.lang.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:
        +
        Why does importmulti not support zpub and ypub?
        +
        +
      • +
      + + + + + + + +
        +
      • +

        serializePubB58

        +
        public java.lang.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        serializePrivB58

        +
        public java.lang.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        deserializeB58

        +
        public static DeterministicKey deserializeB58​(java.lang.String base58,
        +                                              Network network)
        +
        Deserialize a base-58-encoded HD Key with no parent
        +
      • +
      + + + + + + + +
        +
      • +

        deserializeB58

        +
        public static DeterministicKey deserializeB58​(@Nullable
        +                                              DeterministicKey parent,
        +                                              java.lang.String base58,
        +                                              Network network)
        +
        Deserialize a base-58-encoded HD Key.
        +
        +
        Parameters:
        +
        parent - The parent node in the given key's deterministic hierarchy.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if the base58 encoded key could not be parsed.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        deserialize

        +
        public static DeterministicKey deserialize​(Network network,
        +                                           byte[] serializedKey)
        +
        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.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        creationTime

        +
        public java.util.Optional<java.time.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 + in which case the time is stored alongside the key as per normal, see ECKey.creationTime().
        +
        +
        Specified by:
        +
        creationTime in interface EncryptableItem
        +
        Overrides:
        +
        creationTime in class ECKey
        +
        +
      • +
      + + + +
        +
      • +

        setCreationTime

        +
        public void setCreationTime​(java.time.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class ECKey
        +
        +
      • +
      + + + +
        +
      • +

        formatKeyWithAddress

        +
        public void formatKeyWithAddress​(boolean includePrivateKeys,
        +                                 @Nullable
        +                                 AesKey aesKey,
        +                                 java.lang.StringBuilder builder,
        +                                 Network network,
        +                                 ScriptType outputScriptType,
        +                                 @Nullable
        +                                 java.lang.String comment)
        +
        +
        Overrides:
        +
        formatKeyWithAddress in class ECKey
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/DumpedPrivateKey.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/DumpedPrivateKey.html new file mode 100644 index 000000000..dee4d95a6 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/DumpedPrivateKey.html @@ -0,0 +1,421 @@ + + + + + +DumpedPrivateKey (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + + + + + +
        +
      • +

        toBase58

        +
        public java.lang.String toBase58()
        +
        Returns the base58-encoded textual form, including version and checksum bytes.
        +
        +
        Returns:
        +
        textual form
        +
        +
      • +
      + + + +
        +
      • +

        getKey

        +
        public ECKey getKey()
        +
        Returns an ECKey created from this encoded private key.
        +
      • +
      + + + +
        +
      • +

        isPubKeyCompressed

        +
        public boolean isPubKeyCompressed()
        +
        Returns true if the public key corresponding to this private key is compressed.
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.ECDSASignature.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.ECDSASignature.html new file mode 100644 index 000000000..d8c68cf97 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.ECDSASignature.html @@ -0,0 +1,499 @@ + + + + + +ECKey.ECDSASignature (bitcoinj-core 0.17-SNAPSHOT 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 java.lang.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 Summary

      + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      java.math.BigIntegerr +
      The two components of the signature.
      +
      java.math.BigIntegers +
      The two components of the signature.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      ECDSASignature​(java.math.BigInteger r, + java.math.BigInteger s) +
      Constructs a signature with the given components.
      +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        r

        +
        public final java.math.BigInteger r
        +
        The two components of the signature.
        +
      • +
      + + + +
        +
      • +

        s

        +
        public final java.math.BigInteger s
        +
        The two components of the signature.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ECDSASignature

        +
        public ECDSASignature​(java.math.BigInteger r,
        +                      java.math.BigInteger s)
        +
        Constructs a signature with the given components. Does NOT automatically canonicalise the signature.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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.
        +
      • +
      + + + + + + + +
        +
      • +

        derByteStream

        +
        protected java.io.ByteArrayOutputStream derByteStream()
        +                                               throws java.io.IOException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.KeyIsEncryptedException.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.KeyIsEncryptedException.html new file mode 100644 index 000000000..e82349252 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.KeyIsEncryptedException.html @@ -0,0 +1,305 @@ + + + + + +ECKey.KeyIsEncryptedException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ECKey.KeyIsEncryptedException

+
+
+ +
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        KeyIsEncryptedException

        +
        public KeyIsEncryptedException()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.MissingPrivateKeyException.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.MissingPrivateKeyException.html new file mode 100644 index 000000000..fef04aac6 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.MissingPrivateKeyException.html @@ -0,0 +1,304 @@ + + + + + +ECKey.MissingPrivateKeyException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ECKey.MissingPrivateKeyException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • java.lang.RuntimeException
        • +
        • +
            +
          • org.bitcoinj.crypto.ECKey.MissingPrivateKeyException
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    Direct Known Subclasses:
    +
    ECKey.KeyIsEncryptedException
    +
    +
    +
    Enclosing class:
    +
    ECKey
    +
    +
    +
    public static class ECKey.MissingPrivateKeyException
    +extends java.lang.RuntimeException
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        MissingPrivateKeyException

        +
        public MissingPrivateKeyException()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.html new file mode 100644 index 000000000..deeb54641 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/ECKey.html @@ -0,0 +1,2246 @@ + + + + + +ECKey (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ECKey

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.ECKey
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    EncryptableItem
    +
    +
    +
    Direct Known Subclasses:
    +
    DeterministicKey
    +
    +
    +
    public class ECKey
    +extends java.lang.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. If in doubt, ask on the mailing list.

    + +

    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.

    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static class ECKey.ECDSASignature +
      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.
      +
      static class ECKey.KeyIsEncryptedException 
      static class ECKey.MissingPrivateKeyException 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      static java.util.Comparator<ECKey>AGE_COMPARATOR +
      Sorts oldest keys first, newest last.
      +
      protected java.time.InstantcreationTime 
      static org.bouncycastle.crypto.params.ECDomainParametersCURVE +
      The parameters of the secp256k1 curve that Bitcoin uses.
      +
      protected EncryptedDataencryptedPrivateKey 
      static java.math.BigIntegerHALF_CURVE_ORDER +
      Equal to CURVE.getN().shiftRight(1), used for canonicalising the S value of a signature.
      +
      protected KeyCrypterkeyCrypter 
      protected java.math.BigIntegerpriv 
      protected LazyECPointpub 
      static java.util.Comparator<ECKey>PUBKEY_COMPARATOR +
      Compares by extracting pub key as a byte[] and using a lexicographic comparator
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Constructors 
      ModifierConstructorDescription
       ECKey() +
      Generates an entirely new keypair.
      +
      protected ECKey​(java.math.BigInteger priv, + LazyECPoint pub) 
      protected ECKey​(java.math.BigInteger priv, + org.bouncycastle.math.ec.ECPoint pub, + boolean compressed) 
       ECKey​(java.security.SecureRandom secureRandom) +
      Generates an entirely new keypair with the given SecureRandom object.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      voidclearCreationTime() +
      Clears the creation time of this key.
      +
      java.util.Optional<java.time.Instant>creationTime() +
      Returns the creation time of this key, or empty if the key was deserialized from a version that did not store + that data.
      +
      ECKeydecompress() +
      Returns a copy of this key, but with the public point represented in uncompressed form.
      +
      ECKeydecrypt​(AesKey aesKey) +
      Create a decrypted private key with AES key.
      +
      ECKeydecrypt​(KeyCrypter keyCrypter, + AesKey aesKey) +
      Create a decrypted private key with the keyCrypter and AES key supplied.
      +
      protected ECKey.ECDSASignaturedoSign​(Sha256Hash input, + java.math.BigInteger privateKeyForSigning) 
      ECKeyencrypt​(KeyCrypter keyCrypter, + AesKey aesKey) +
      Create an encrypted private key with the keyCrypter and the AES key supplied.
      +
      static booleanencryptionIsReversible​(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.
      +
      booleanequals​(java.lang.Object o) 
      bytefindRecoveryId​(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.
      +
      voidformatKeyWithAddress​(boolean includePrivateKeys, + AesKey aesKey, + java.lang.StringBuilder builder, + Network network, + ScriptType outputScriptType, + java.lang.String comment) 
      voidformatKeyWithAddress​(boolean includePrivateKeys, + AesKey aesKey, + java.lang.StringBuilder builder, + NetworkParameters params, + ScriptType outputScriptType, + java.lang.String comment) + +
      static ECKeyfromASN1​(byte[] asn1privkey) +
      Construct an ECKey from an ASN.1 encoded private key.
      +
      static ECKeyfromEncrypted​(EncryptedData encryptedPrivateKey, + KeyCrypter crypter, + byte[] pubKey) +
      Constructs a key that has an encrypted private component.
      +
      static ECKeyfromPrivate​(byte[] privKeyBytes) +
      Creates an ECKey given the private key only.
      +
      static ECKeyfromPrivate​(byte[] privKeyBytes, + boolean compressed) +
      Creates an ECKey given the private key only.
      +
      static ECKeyfromPrivate​(java.math.BigInteger privKey) +
      Creates an ECKey given the private key only.
      +
      static ECKeyfromPrivate​(java.math.BigInteger privKey, + boolean compressed) +
      Creates an ECKey given the private key only.
      +
      static ECKeyfromPrivateAndPrecalculatedPublic​(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.
      +
      static ECKeyfromPrivateAndPrecalculatedPublic​(java.math.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.
      +
      static ECKeyfromPublicOnly​(byte[] pub) +
      Creates an ECKey that cannot be used for signing, only verifying signatures, from the given encoded point.
      +
      static ECKeyfromPublicOnly​(ECKey key) 
      static ECKeyfromPublicOnly​(org.bouncycastle.math.ec.ECPoint pub, + boolean compressed) +
      Creates an ECKey that cannot be used for signing, only verifying signatures, from the given point.
      +
      EncryptedDatagetEncryptedData() + +
      EncryptedDatagetEncryptedPrivateKey() +
      Returns the the encrypted private key bytes and initialisation vector for this ECKey, or null if the ECKey + is not encrypted.
      +
      org.bitcoinj.protobuf.wallet.Protos.Wallet.EncryptionTypegetEncryptionType() +
      Returns an enum constant describing what algorithm was used to encrypt the key or UNENCRYPTED.
      +
      KeyCryptergetKeyCrypter() +
      Returns the KeyCrypter that was used to encrypt to encrypt this ECKey.
      +
      java.lang.StringgetPrivateKeyAsHex() 
      java.lang.StringgetPrivateKeyAsWiF​(Network network) 
      java.lang.StringgetPrivateKeyAsWiF​(NetworkParameters params) + +
      DumpedPrivateKeygetPrivateKeyEncoded​(Network network) +
      Exports the private key in the form used by Bitcoin Core's "dumpprivkey" and "importprivkey" commands.
      +
      DumpedPrivateKeygetPrivateKeyEncoded​(NetworkParameters params) + +
      java.math.BigIntegergetPrivKey() +
      Gets the private key in the form of an integer field element.
      +
      byte[]getPrivKeyBytes() +
      Returns a 32 byte array containing the private key.
      +
      byte[]getPubKey() +
      Gets the raw public key value.
      +
      byte[]getPubKeyHash() +
      Gets the hash160 form of the public key (as seen in addresses).
      +
      org.bouncycastle.math.ec.ECPointgetPubKeyPoint() +
      Gets the public key in the form of an elliptic curve point object from Bouncy Castle.
      +
      java.lang.StringgetPublicKeyAsHex() 
      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).
      +
      inthashCode() 
      booleanhasPrivKey() +
      Returns true if this key has unencrypted access to private key bytes.
      +
      booleanisCompressed() +
      Returns whether this key is using the compressed form or not.
      +
      booleanisEncrypted() +
      Indicates whether the private key is encrypted (true) or not (false).
      +
      static booleanisPubKeyCanonical​(byte[] pubkey) +
      Returns true if the given pubkey is canonical, i.e.
      +
      static booleanisPubKeyCompressed​(byte[] encoded) +
      Returns true if the given pubkey is in its compressed form.
      +
      booleanisPubKeyOnly() +
      Returns true if this key doesn't have unencrypted access to private key bytes.
      +
      booleanisWatching() +
      Returns true if this key is watch only, meaning it has a public key but no private key.
      +
      ECKeymaybeDecrypt​(AesKey aesKey) +
      Creates decrypted private key if needed.
      +
      static byte[]publicKeyFromPrivate​(java.math.BigInteger privKey, + boolean compressed) +
      Returns public key bytes from the given private key.
      +
      static org.bouncycastle.math.ec.ECPointpublicPointFromPrivate​(java.math.BigInteger privKey) +
      Returns public key point from the given private key.
      +
      static ECKeyrecoverFromSignature​(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.
      +
      voidsetCreationTime​(java.time.Instant creationTime) +
      Sets the creation time of this key.
      +
      voidsetCreationTimeSeconds​(long creationTimeSecs) +
      Deprecated. + +
      +
      ECKey.ECDSASignaturesign​(Sha256Hash input) +
      Signs the given hash and returns the R and S components as BigIntegers.
      +
      ECKey.ECDSASignaturesign​(Sha256Hash input, + AesKey aesKey) +
      Signs the given hash and returns the R and S components as BigIntegers.
      +
      static ECKeysignedMessageToKey​(java.lang.String message, + java.lang.String signatureBase64) +
      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.
      +
      java.lang.StringsignMessage​(java.lang.String message) +
      Deprecated. +
      use signMessage(String, ScriptType) instead and specify the correct script type
      +
      +
      java.lang.StringsignMessage​(java.lang.String message, + ScriptType scriptType) +
      Signs a text message using the standard Bitcoin messaging signing format and returns the signature as a base64 + encoded string.
      +
      java.lang.StringsignMessage​(java.lang.String message, + AesKey aesKey) +
      Deprecated. +
      use signMessage(String, AesKey, ScriptType) instead and specify the correct script type
      +
      +
      java.lang.StringsignMessage​(java.lang.String message, + AesKey aesKey, + ScriptType scriptType) +
      Signs a text message using the standard Bitcoin messaging signing format and returns the signature as a base64 + encoded string.
      +
      AddresstoAddress​(ScriptType scriptType, + Network network) 
      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.
      +
      java.lang.StringtoString() 
      java.lang.StringtoStringWithPrivate​(AesKey aesKey, + Network network) +
      Produce a string rendering of the ECKey INCLUDING the private key.
      +
      java.lang.StringtoStringWithPrivate​(AesKey aesKey, + NetworkParameters params) + +
      booleanverify​(byte[] hash, + byte[] signature) +
      Verifies the given ASN.1 encoded ECDSA signature against a hash using the public key.
      +
      static booleanverify​(byte[] data, + byte[] signature, + byte[] pub) +
      Verifies the given ASN.1 encoded ECDSA signature against a hash using the public key.
      +
      static booleanverify​(byte[] data, + ECKey.ECDSASignature signature, + byte[] pub) +
      Verifies the given ECDSA signature against the message bytes using the public key bytes.
      +
      booleanverify​(Sha256Hash sigHash, + ECKey.ECDSASignature signature) +
      Verifies the given R/S pair (signature) against a hash using the public key.
      +
      voidverifyMessage​(java.lang.String message, + java.lang.String signatureBase64) +
      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…).
      +
      +
      voidverifyOrThrow​(byte[] hash, + byte[] signature) +
      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
      +
      voidverifyOrThrow​(Sha256Hash sigHash, + ECKey.ECDSASignature signature) +
      Verifies the given R/S pair (signature) against a hash using the public key, and throws an exception + if the signature doesn't match
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        AGE_COMPARATOR

        +
        public static final java.util.Comparator<ECKey> AGE_COMPARATOR
        +
        Sorts oldest keys first, newest last.
        +
      • +
      + + + +
        +
      • +

        PUBKEY_COMPARATOR

        +
        public static final java.util.Comparator<ECKey> PUBKEY_COMPARATOR
        +
        Compares by extracting pub key as a byte[] and using a lexicographic comparator
        +
      • +
      + + + +
        +
      • +

        CURVE

        +
        public static final org.bouncycastle.crypto.params.ECDomainParameters CURVE
        +
        The parameters of the secp256k1 curve that Bitcoin uses.
        +
      • +
      + + + +
        +
      • +

        HALF_CURVE_ORDER

        +
        public static final java.math.BigInteger HALF_CURVE_ORDER
        +
        Equal to CURVE.getN().shiftRight(1), used for canonicalising the S value of a signature. If you aren't + sure what this is about, you can ignore it.
        +
      • +
      + + + +
        +
      • +

        priv

        +
        @Nullable
        +protected final java.math.BigInteger priv
        +
      • +
      + + + + + + + +
        +
      • +

        creationTime

        +
        @Nullable
        +protected java.time.Instant creationTime
        +
      • +
      + + + +
        +
      • +

        keyCrypter

        +
        protected KeyCrypter keyCrypter
        +
      • +
      + + + +
        +
      • +

        encryptedPrivateKey

        +
        protected EncryptedData encryptedPrivateKey
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        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​(java.security.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
        +                java.math.BigInteger priv,
        +                org.bouncycastle.math.ec.ECPoint pub,
        +                boolean compressed)
        +
      • +
      + + + +
        +
      • +

        ECKey

        +
        protected ECKey​(@Nullable
        +                java.math.BigInteger priv,
        +                LazyECPoint pub)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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​(java.math.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​(java.math.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​(java.math.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​(java.math.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​(java.math.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 java.math.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:
        +
        java.lang.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.
        +
      • +
      + + + + + + + +
        +
      • +

        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.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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,
        +                          java.security.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.
        +
        java.security.SignatureException - if the signature does not match.
        +
        +
      • +
      + + + +
        +
      • +

        verifyOrThrow

        +
        public void verifyOrThrow​(Sha256Hash sigHash,
        +                          ECKey.ECDSASignature signature)
        +                   throws java.security.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:
        +
        java.security.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 java.lang.String signMessage​(java.lang.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:
        +
        java.lang.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 java.lang.String signMessage​(java.lang.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:
        +
        java.lang.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 java.lang.String signMessage​(java.lang.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:
        +
        java.lang.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 java.lang.String signMessage​(java.lang.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:
        +
        java.lang.IllegalArgumentException - if uncompressed key is used for Segwit scriptType, or unsupported script type is specified
        +
        java.lang.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​(java.lang.String message,
        +                                       java.lang.String signatureBase64)
        +                                throws java.security.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:
        +
        java.security.SignatureException - If the public key could not be recovered or if there was a signature format error.
        +
        +
      • +
      + + + +
        +
      • +

        verifyMessage

        +
        @Deprecated
        +public void verifyMessage​(java.lang.String message,
        +                          java.lang.String signatureBase64)
        +                   throws java.security.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:
        +
        java.security.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:
        +
        java.lang.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.
        +
        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:
        +
        java.lang.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:
        +
        java.lang.IllegalStateException - if the private key is not available.
        +
        +
      • +
      + + + +
        +
      • +

        creationTime

        +
        public java.util.Optional<java.time.Instant> creationTime()
        +
        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:
        +
        creationTime in interface EncryptableItem
        +
        +
      • +
      + + + +
        +
      • +

        setCreationTime

        +
        public void setCreationTime​(java.time.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getEncryptedPrivateKey

        +
        @Nullable
        +public EncryptedData getEncryptedPrivateKey()
        +
        Returns the 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​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        toString

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

        toStringWithPrivate

        +
        public java.lang.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 java.lang.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 java.lang.String getPrivateKeyAsHex()
        +
      • +
      + + + +
        +
      • +

        getPublicKeyAsHex

        +
        public java.lang.String getPublicKeyAsHex()
        +
      • +
      + + + +
        +
      • +

        getPrivateKeyAsWiF

        +
        public java.lang.String getPrivateKeyAsWiF​(Network network)
        +
      • +
      + + + + + + + +
        +
      • +

        formatKeyWithAddress

        +
        public void formatKeyWithAddress​(boolean includePrivateKeys,
        +                                 @Nullable
        +                                 AesKey aesKey,
        +                                 java.lang.StringBuilder builder,
        +                                 Network network,
        +                                 ScriptType outputScriptType,
        +                                 @Nullable
        +                                 java.lang.String comment)
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/EncodedPrivateKey.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/EncodedPrivateKey.html new file mode 100644 index 000000000..da361602b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/EncodedPrivateKey.html @@ -0,0 +1,458 @@ + + + + + +EncodedPrivateKey (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class EncodedPrivateKey

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.EncodedPrivateKey
    • +
    +
  • +
+
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    BIP38PrivateKey, DumpedPrivateKey
    +
    +
    +
    public abstract class EncodedPrivateKey
    +extends java.lang.Object
    +
    Some form of string-encoded private key. This form is useful for noting them down, e.g. on paper wallets.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        network

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

        bytes

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

      Constructor Detail

      + + + +
        +
      • +

        EncodedPrivateKey

        +
        protected EncodedPrivateKey​(Network network,
        +                            byte[] bytes)
        +
      • +
      + + + +
        +
      • +

        EncodedPrivateKey

        +
        @Deprecated
        +protected EncodedPrivateKey​(NetworkParameters params,
        +                            byte[] bytes)
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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 java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/EncryptableItem.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/EncryptableItem.html new file mode 100644 index 000000000..fca25aa42 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/EncryptableItem.html @@ -0,0 +1,350 @@ + + + + + +EncryptableItem (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        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.
        +
      • +
      + + + +
        +
      • +

        creationTime

        +
        java.util.Optional<java.time.Instant> creationTime()
        +
        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-alpha3/org/bitcoinj/crypto/EncryptedData.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/EncryptedData.html new file mode 100644 index 000000000..ee0b1ec65 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/EncryptedData.html @@ -0,0 +1,407 @@ + + + + + +EncryptedData (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class EncryptedData

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.EncryptedData
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class EncryptedData
    +extends java.lang.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.

    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      EncryptedData​(byte[] initialisationVector, + byte[] encryptedBytes) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      inthashCode() 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        initialisationVector

        +
        public final byte[] initialisationVector
        +
      • +
      + + + +
        +
      • +

        encryptedBytes

        +
        public final byte[] encryptedBytes
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        EncryptedData

        +
        public EncryptedData​(byte[] initialisationVector,
        +                     byte[] encryptedBytes)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDDerivationException.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDDerivationException.html new file mode 100644 index 000000000..6b347316d --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDDerivationException.html @@ -0,0 +1,296 @@ + + + + + +HDDerivationException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class HDDerivationException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • java.lang.RuntimeException
        • +
        • +
            +
          • org.bitcoinj.crypto.HDDerivationException
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class HDDerivationException
    +extends java.lang.RuntimeException
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      HDDerivationException​(java.lang.String message) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        HDDerivationException

        +
        public HDDerivationException​(java.lang.String message)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDKeyDerivation.PublicDeriveMode.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDKeyDerivation.PublicDeriveMode.html new file mode 100644 index 000000000..a4b2bebb5 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDKeyDerivation.PublicDeriveMode.html @@ -0,0 +1,380 @@ + + + + + +HDKeyDerivation.PublicDeriveMode (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum HDKeyDerivation.PublicDeriveMode

+
+
+ +
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      NORMAL 
      WITH_INVERSION 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static HDKeyDerivation.PublicDeriveModevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static HDKeyDerivation.PublicDeriveMode[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static HDKeyDerivation.PublicDeriveMode[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (HDKeyDerivation.PublicDeriveMode c : HDKeyDerivation.PublicDeriveMode.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static HDKeyDerivation.PublicDeriveMode valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDKeyDerivation.RawKeyBytes.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDKeyDerivation.RawKeyBytes.html new file mode 100644 index 000000000..59a9842a3 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDKeyDerivation.RawKeyBytes.html @@ -0,0 +1,328 @@ + + + + + +HDKeyDerivation.RawKeyBytes (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class HDKeyDerivation.RawKeyBytes

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.HDKeyDerivation.RawKeyBytes
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    HDKeyDerivation
    +
    +
    +
    public static class HDKeyDerivation.RawKeyBytes
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      byte[]chainCode 
      byte[]keyBytes 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      RawKeyBytes​(byte[] keyBytes, + byte[] chainCode) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        keyBytes

        +
        public final byte[] keyBytes
        +
      • +
      + + + +
        +
      • +

        chainCode

        +
        public final byte[] chainCode
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        RawKeyBytes

        +
        public RawKeyBytes​(byte[] keyBytes,
        +                   byte[] chainCode)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDKeyDerivation.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDKeyDerivation.html new file mode 100644 index 000000000..2200b0d4f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDKeyDerivation.html @@ -0,0 +1,575 @@ + + + + + +HDKeyDerivation (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class HDKeyDerivation

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.HDKeyDerivation
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class HDKeyDerivation
    +extends java.lang.Object
    +
    Implementation of the BIP 32 + deterministic wallet child key generation algorithm.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDPath.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDPath.html new file mode 100644 index 000000000..40e3c1f95 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDPath.html @@ -0,0 +1,953 @@ + + + + + +HDPath (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class HDPath

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.util.AbstractCollection<E>
    • +
    • +
        +
      • java.util.AbstractList<ChildNumber>
      • +
      • +
          +
        • org.bitcoinj.crypto.HDPath
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.lang.Iterable<ChildNumber>, java.util.Collection<ChildNumber>, java.util.List<ChildNumber>
    +
    +
    +
    public class HDPath
    +extends java.util.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.)

    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      HDPath​(boolean hasPrivateKey, + java.util.List<ChildNumber> list) +
      Constructs a path for a public or private key.
      +
      HDPath​(java.util.List<ChildNumber> list) +
      Deprecated. +
      Use M(List) or m(List) instead
      +
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.util.List<HDPath>ancestors() +
      Return a list of all ancestors of this path
      +
      java.util.List<HDPath>ancestors​(boolean includeSelf) +
      Return a list of all ancestors of this path
      +
      static HDPathdeserialize​(java.util.List<java.lang.Integer> integerList) +
      Deserialize a list of integers into an HDPath (internal use only)
      +
      HDPathextend​(java.util.List<ChildNumber> path2) +
      Extend the path by appending a relative path.
      +
      HDPathextend​(ChildNumber child1, + ChildNumber... children) +
      Extend the path by appending additional ChildNumber objects.
      +
      HDPathextend​(HDPath path2) +
      Extend the path by appending a relative path.
      +
      ChildNumberget​(int index) 
      booleanhasPrivateKey() +
      Is this a path to a private key?
      +
      java.util.List<ChildNumber>list() +
      Return a simple list of ChildNumber
      +
      static HDPathm() +
      Returns an empty path for a private key.
      +
      static HDPathm​(java.util.List<ChildNumber> list) +
      Returns a path for a private key.
      +
      static HDPathm​(ChildNumber childNumber) +
      Returns a path for a private key.
      +
      static HDPathm​(ChildNumber... children) +
      Returns a path for a private key.
      +
      static HDPathM() +
      Returns an empty path for a public key.
      +
      static HDPathM​(java.util.List<ChildNumber> list) +
      Returns a path for a public key.
      +
      static HDPathM​(ChildNumber childNumber) +
      Returns a path for a public key.
      +
      static HDPathM​(ChildNumber... children) +
      Returns a path for a public key.
      +
      HDPathparent() +
      Return the parent path.
      +
      static HDPathparsePath​(java.lang.String path) +
      Create an HDPath from a path string.
      +
      intsize() 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.util.AbstractList

        +add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
      • +
      +
        +
      • + + +

        Methods inherited from class java.util.AbstractCollection

        +addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

        Methods inherited from interface java.util.Collection

        +parallelStream, removeIf, stream, toArray
      • +
      +
        +
      • + + +

        Methods inherited from interface java.lang.Iterable

        +forEach
      • +
      +
        +
      • + + +

        Methods inherited from interface java.util.List

        +addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        hasPrivateKey

        +
        protected final boolean hasPrivateKey
        +
      • +
      + + + +
        +
      • +

        unmodifiableList

        +
        protected final java.util.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 Detail

      + + + +
        +
      • +

        HDPath

        +
        public HDPath​(boolean hasPrivateKey,
        +              java.util.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​(java.util.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 Detail

      + + + +
        +
      • +

        deserialize

        +
        public static HDPath deserialize​(java.util.List<java.lang.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​(java.util.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​(java.util.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
        +                               java.lang.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​(java.util.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 java.util.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 java.util.List<HDPath> ancestors()
        +
        Return a list of all ancestors of this path
        +
        +
        Returns:
        +
        unmodifiable list of ancestors
        +
        +
      • +
      + + + +
        +
      • +

        ancestors

        +
        public java.util.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 java.util.List<ChildNumber>
        +
        Specified by:
        +
        get in class java.util.AbstractList<ChildNumber>
        +
        +
      • +
      + + + +
        +
      • +

        size

        +
        public int size()
        +
        +
        Specified by:
        +
        size in interface java.util.Collection<ChildNumber>
        +
        Specified by:
        +
        size in interface java.util.List<ChildNumber>
        +
        Specified by:
        +
        size in class java.util.AbstractCollection<ChildNumber>
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.util.AbstractCollection<ChildNumber>
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDUtils.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDUtils.html new file mode 100644 index 000000000..ea1efa69e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/HDUtils.html @@ -0,0 +1,307 @@ + + + + + +HDUtils (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class HDUtils

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.HDUtils
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class HDUtils
    +extends java.lang.Object
    +
    Static utilities used in BIP 32 Hierarchical Deterministic Wallets (HDW).
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      HDUtils() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static byte[]hmacSha512​(byte[] key, + byte[] data) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        HDUtils

        +
        public HDUtils()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        hmacSha512

        +
        public static byte[] hmacSha512​(byte[] key,
        +                                byte[] data)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypter.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypter.html new file mode 100644 index 000000000..a78a413ad --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypter.html @@ -0,0 +1,344 @@ + + + + + +KeyCrypter (bitcoinj-core 0.17-SNAPSHOT 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

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      byte[]decrypt​(EncryptedData encryptedBytesToDecode, + AesKey aesKey) +
      Decrypt the provided encrypted bytes, converting them into unencrypted bytes.
      +
      AesKeyderiveKey​(java.lang.CharSequence password) +
      Create an AESKey (which typically contains an AES key)
      +
      EncryptedDataencrypt​(byte[] plainBytes, + AesKey aesKey) +
      Encrypt the supplied bytes, converting them into ciphertext.
      +
      org.bitcoinj.protobuf.wallet.Protos.Wallet.EncryptionTypegetUnderstoodEncryptionType() +
      Return the EncryptionType enum value which denotes the type of encryption/ decryption that this KeyCrypter + can understand.
      +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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​(java.lang.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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-alpha3/org/bitcoinj/crypto/KeyCrypterException.InvalidCipherText.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterException.InvalidCipherText.html new file mode 100644 index 000000000..f8680e554 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterException.InvalidCipherText.html @@ -0,0 +1,339 @@ + + + + + +KeyCrypterException.InvalidCipherText (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class KeyCrypterException.InvalidCipherText

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      InvalidCipherText​(java.lang.String message) 
      InvalidCipherText​(java.lang.String message, + java.lang.Throwable throwable) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        InvalidCipherText

        +
        public InvalidCipherText​(java.lang.String message)
        +
      • +
      + + + +
        +
      • +

        InvalidCipherText

        +
        public InvalidCipherText​(java.lang.String message,
        +                         java.lang.Throwable throwable)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterException.PublicPrivateMismatch.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterException.PublicPrivateMismatch.html new file mode 100644 index 000000000..5eca5204e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterException.PublicPrivateMismatch.html @@ -0,0 +1,339 @@ + + + + + +KeyCrypterException.PublicPrivateMismatch (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class KeyCrypterException.PublicPrivateMismatch

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • + +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      PublicPrivateMismatch​(java.lang.String message) 
      PublicPrivateMismatch​(java.lang.String message, + java.lang.Throwable throwable) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        PublicPrivateMismatch

        +
        public PublicPrivateMismatch​(java.lang.String message)
        +
      • +
      + + + +
        +
      • +

        PublicPrivateMismatch

        +
        public PublicPrivateMismatch​(java.lang.String message,
        +                             java.lang.Throwable throwable)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterException.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterException.html new file mode 100644 index 000000000..c2c81f598 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterException.html @@ -0,0 +1,356 @@ + + + + + +KeyCrypterException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class KeyCrypterException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • java.lang.RuntimeException
        • +
        • +
            +
          • org.bitcoinj.crypto.KeyCrypterException
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    Direct Known Subclasses:
    +
    KeyCrypterException.InvalidCipherText, KeyCrypterException.PublicPrivateMismatch
    +
    +
    +
    public class KeyCrypterException
    +extends java.lang.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static class KeyCrypterException.InvalidCipherText +
      This exception is thrown when a private key or seed is decrypted, the decrypted message is damaged + (e.g.
      +
      static class KeyCrypterException.PublicPrivateMismatch +
      This exception is thrown when a private key or seed is decrypted, it doesn't match its public key any + more.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      KeyCrypterException​(java.lang.String message) 
      KeyCrypterException​(java.lang.String message, + java.lang.Throwable throwable) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        KeyCrypterException

        +
        public KeyCrypterException​(java.lang.String message)
        +
      • +
      + + + +
        +
      • +

        KeyCrypterException

        +
        public KeyCrypterException​(java.lang.String message,
        +                           java.lang.Throwable throwable)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterScrypt.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterScrypt.html new file mode 100644 index 000000000..04a720b23 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/KeyCrypterScrypt.html @@ -0,0 +1,642 @@ + + + + + +KeyCrypterScrypt (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class KeyCrypterScrypt

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.KeyCrypterScrypt
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    KeyCrypter
    +
    +
    +
    public class KeyCrypterScrypt
    +extends java.lang.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 TypeFieldDescription
      static intBLOCK_LENGTH +
      The size of an AES block in bytes.
      +
      static intKEY_LENGTH +
      Key length in bytes.
      +
      static intSALT_LENGTH +
      The length of the salt used.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      KeyCrypterScrypt() +
      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

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      byte[]decrypt​(EncryptedData dataToDecrypt, + AesKey aesKey) +
      Decrypt bytes previously encrypted with this class.
      +
      AesKeyderiveKey​(java.lang.CharSequence password) +
      Generate AES key.
      +
      EncryptedDataencrypt​(byte[] plainBytes, + AesKey aesKey) +
      Password based encryption using AES - CBC 256 bits.
      +
      booleanequals​(java.lang.Object o) 
      org.bitcoinj.protobuf.wallet.Protos.ScryptParametersgetScryptParameters() 
      org.bitcoinj.protobuf.wallet.Protos.Wallet.EncryptionTypegetUnderstoodEncryptionType() +
      Return the EncryptionType enum value which denotes the type of encryption/ decryption that this KeyCrypter + can understand.
      +
      inthashCode() 
      static byte[]randomSalt() +
      Returns SALT_LENGTH (8) bytes of random data
      +
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        KEY_LENGTH

        +
        public static final int KEY_LENGTH
        +
        Key length in bytes.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        SALT_LENGTH

        +
        public static final int SALT_LENGTH
        +
        The length of the salt used.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        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:
        +
        java.lang.NullPointerException - if the scryptParameters or any of its N, R or P is null.
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        randomSalt

        +
        public static byte[] randomSalt()
        +
        Returns SALT_LENGTH (8) bytes of random data
        +
      • +
      + + + +
        +
      • +

        deriveKey

        +
        public AesKey deriveKey​(java.lang.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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

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

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/LazyECPoint.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/LazyECPoint.html new file mode 100644 index 000000000..511e3ceea --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/LazyECPoint.html @@ -0,0 +1,804 @@ + + + + + +LazyECPoint (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class LazyECPoint

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.LazyECPoint
    • +
    +
  • +
+
+
    +
  • +
    +
    public class LazyECPoint
    +extends java.lang.Object
    +
    A wrapper around 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 
      ConstructorDescription
      LazyECPoint​(org.bouncycastle.math.ec.ECCurve curve, + byte[] bits) +
      Construct a LazyECPoint from a public key.
      +
      LazyECPoint​(org.bouncycastle.math.ec.ECPoint point, + boolean compressed) +
      Construct a LazyECPoint from an already decoded point.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      org.bouncycastle.math.ec.ECPointadd​(org.bouncycastle.math.ec.ECPoint b) 
      LazyECPointcompress() +
      Returns a compressed version of this elliptic curve point.
      +
      LazyECPointdecompress() +
      Returns a decompressed version of this elliptic curve point.
      +
      booleanequals​(java.lang.Object o) 
      booleanequals​(org.bouncycastle.math.ec.ECPoint other) 
      org.bouncycastle.math.ec.ECPointget() 
      org.bouncycastle.math.ec.ECFieldElementgetAffineXCoord() 
      org.bouncycastle.math.ec.ECFieldElementgetAffineYCoord() 
      org.bouncycastle.math.ec.ECCurvegetCurve() 
      org.bouncycastle.math.ec.ECPointgetDetachedPoint() 
      byte[]getEncoded() 
      byte[]getEncoded​(boolean compressed) 
      org.bouncycastle.math.ec.ECFieldElementgetX() 
      org.bouncycastle.math.ec.ECFieldElementgetXCoord() 
      org.bouncycastle.math.ec.ECFieldElementgetY() 
      org.bouncycastle.math.ec.ECFieldElementgetYCoord() 
      org.bouncycastle.math.ec.ECFieldElementgetZCoord​(int index) 
      org.bouncycastle.math.ec.ECFieldElement[]getZCoords() 
      inthashCode() 
      booleanisCompressed() 
      booleanisInfinity() 
      booleanisNormalized() 
      booleanisValid() 
      org.bouncycastle.math.ec.ECPointmultiply​(java.math.BigInteger k) 
      org.bouncycastle.math.ec.ECPointnegate() 
      org.bouncycastle.math.ec.ECPointnormalize() 
      org.bouncycastle.math.ec.ECPointscaleX​(org.bouncycastle.math.ec.ECFieldElement scale) 
      org.bouncycastle.math.ec.ECPointscaleY​(org.bouncycastle.math.ec.ECFieldElement scale) 
      org.bouncycastle.math.ec.ECPointsubtract​(org.bouncycastle.math.ec.ECPoint b) 
      org.bouncycastle.math.ec.ECPointthreeTimes() 
      org.bouncycastle.math.ec.ECPointtimesPow2​(int e) 
      org.bouncycastle.math.ec.ECPointtwice() 
      org.bouncycastle.math.ec.ECPointtwicePlus​(org.bouncycastle.math.ec.ECPoint b) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        LazyECPoint

        +
        public LazyECPoint​(org.bouncycastle.math.ec.ECCurve curve,
        +                   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:
        +
        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 Detail

      + + + +
        +
      • +

        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​(java.math.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​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/LinuxSecureRandom.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/LinuxSecureRandom.html new file mode 100644 index 000000000..8783502e7 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/LinuxSecureRandom.html @@ -0,0 +1,368 @@ + + + + + +LinuxSecureRandom (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class LinuxSecureRandom

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.security.SecureRandomSpi
    • +
    • +
        +
      • org.bitcoinj.crypto.LinuxSecureRandom
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class LinuxSecureRandom
    +extends java.security.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      LinuxSecureRandom() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      protected byte[]engineGenerateSeed​(int i) 
      protected voidengineNextBytes​(byte[] bytes) 
      protected voidengineSetSeed​(byte[] bytes) 
      +
        +
      • + + +

        Methods inherited from class java.security.SecureRandomSpi

        +engineGetParameters, engineNextBytes, engineReseed, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        LinuxSecureRandom

        +
        public LinuxSecureRandom()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        engineSetSeed

        +
        protected void engineSetSeed​(byte[] bytes)
        +
        +
        Specified by:
        +
        engineSetSeed in class java.security.SecureRandomSpi
        +
        +
      • +
      + + + +
        +
      • +

        engineNextBytes

        +
        protected void engineNextBytes​(byte[] bytes)
        +
        +
        Specified by:
        +
        engineNextBytes in class java.security.SecureRandomSpi
        +
        +
      • +
      + + + +
        +
      • +

        engineGenerateSeed

        +
        protected byte[] engineGenerateSeed​(int i)
        +
        +
        Specified by:
        +
        engineGenerateSeed in class java.security.SecureRandomSpi
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicCode.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicCode.html new file mode 100644 index 000000000..8c1e8ef24 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicCode.html @@ -0,0 +1,520 @@ + + + + + +MnemonicCode (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MnemonicCode

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.MnemonicCode
    • +
    +
  • +
+
+
    +
  • +
    +
    public class MnemonicCode
    +extends java.lang.Object
    +
    A MnemonicCode object may be used to convert between binary seed values and + lists of words per the BIP 39 + specification
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      MnemonicCode() +
      Initialise from the included word list.
      +
      MnemonicCode​(java.io.InputStream wordstream, + java.lang.String wordListDigest) +
      Creates an MnemonicCode object, initializing with words read from the supplied input stream.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidcheck​(java.util.List<java.lang.String> words) +
      Check to see if a mnemonic word list is valid.
      +
      java.util.List<java.lang.String>getWordList() +
      Gets the word list this code uses.
      +
      byte[]toEntropy​(java.util.List<java.lang.String> words) +
      Convert mnemonic word list to original entropy value.
      +
      java.util.List<java.lang.String>toMnemonic​(byte[] entropy) +
      Convert entropy data to mnemonic word list.
      +
      static byte[]toSeed​(java.util.List<java.lang.String> words, + java.lang.String passphrase) +
      Convert mnemonic word list to seed.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        BIP39_STANDARDISATION_TIME

        +
        public static final java.time.Instant BIP39_STANDARDISATION_TIME
        +
        UNIX time for when the BIP39 standard was finalised. This can be used as a default seed birthday.
        +
      • +
      + + + +
        +
      • +

        BIP39_STANDARDISATION_TIME_SECS

        +
        @Deprecated
        +public static final int BIP39_STANDARDISATION_TIME_SECS
        +
        Deprecated. + +
        +
      • +
      + + + + +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MnemonicCode

        +
        public MnemonicCode()
        +             throws java.io.IOException
        +
        Initialise from the included word list. Won't work on Android.
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        MnemonicCode

        +
        public MnemonicCode​(java.io.InputStream wordstream,
        +                    java.lang.String wordListDigest)
        +             throws java.io.IOException,
        +                    java.lang.IllegalArgumentException
        +
        Creates an MnemonicCode object, initializing with words read from the supplied input stream. If a wordListDigest + is supplied the digest of the words will be checked.
        +
        +
        Parameters:
        +
        wordstream - input stream of 2048 line-seperated words
        +
        wordListDigest - hex-encoded Sha256 digest to check against
        +
        Throws:
        +
        java.io.IOException - if there was a problem reading the steam
        +
        java.lang.IllegalArgumentException - if list size is not 2048 or digest mismatch
        +
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.MnemonicChecksumException.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.MnemonicChecksumException.html new file mode 100644 index 000000000..c42bf0d60 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.MnemonicChecksumException.html @@ -0,0 +1,318 @@ + + + + + +MnemonicException.MnemonicChecksumException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MnemonicException.MnemonicChecksumException

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    Enclosing class:
    +
    MnemonicException
    +
    +
    +
    public static class MnemonicException.MnemonicChecksumException
    +extends MnemonicException
    +
    Thrown when a list of MnemonicCode words fails the checksum check.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MnemonicChecksumException

        +
        public MnemonicChecksumException()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.MnemonicLengthException.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.MnemonicLengthException.html new file mode 100644 index 000000000..21199e853 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.MnemonicLengthException.html @@ -0,0 +1,318 @@ + + + + + +MnemonicException.MnemonicLengthException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MnemonicException.MnemonicLengthException

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    Enclosing class:
    +
    MnemonicException
    +
    +
    +
    public static class MnemonicException.MnemonicLengthException
    +extends MnemonicException
    +
    Thrown when an argument to MnemonicCode is the wrong length.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MnemonicLengthException

        +
        public MnemonicLengthException​(java.lang.String msg)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.MnemonicWordException.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.MnemonicWordException.html new file mode 100644 index 000000000..e51b9f54b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.MnemonicWordException.html @@ -0,0 +1,363 @@ + + + + + +MnemonicException.MnemonicWordException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MnemonicException.MnemonicWordException

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      java.lang.StringbadWord +
      Contains the word that was not found in the word list.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      MnemonicWordException​(java.lang.String badWord) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        badWord

        +
        public final java.lang.String badWord
        +
        Contains the word that was not found in the word list.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MnemonicWordException

        +
        public MnemonicWordException​(java.lang.String badWord)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.html new file mode 100644 index 000000000..354b6029d --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/MnemonicException.html @@ -0,0 +1,348 @@ + + + + + +MnemonicException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MnemonicException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.bitcoinj.crypto.MnemonicException
        • +
        +
      • +
      +
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    + +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        MnemonicException

        +
        public MnemonicException()
        +
      • +
      + + + +
        +
      • +

        MnemonicException

        +
        public MnemonicException​(java.lang.String msg)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/PBKDF2SHA512.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/PBKDF2SHA512.html new file mode 100644 index 000000000..55ac2e330 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/PBKDF2SHA512.html @@ -0,0 +1,329 @@ + + + + + +PBKDF2SHA512 (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PBKDF2SHA512

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.PBKDF2SHA512
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      PBKDF2SHA512() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static byte[]derive​(java.lang.String P, + java.lang.String S, + int c, + int dkLen) +
      Derive a key using PBKDF2-SHA512
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        PBKDF2SHA512

        +
        public PBKDF2SHA512()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        derive

        +
        public static byte[] derive​(java.lang.String P,
        +                            java.lang.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-alpha3/org/bitcoinj/crypto/SignatureDecodeException.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/SignatureDecodeException.html new file mode 100644 index 000000000..d6a6795d1 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/SignatureDecodeException.html @@ -0,0 +1,332 @@ + + + + + +SignatureDecodeException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class SignatureDecodeException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.bitcoinj.crypto.SignatureDecodeException
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class SignatureDecodeException
    +extends java.lang.Exception
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        SignatureDecodeException

        +
        public SignatureDecodeException()
        +
      • +
      + + + +
        +
      • +

        SignatureDecodeException

        +
        public SignatureDecodeException​(java.lang.String message)
        +
      • +
      + + + +
        +
      • +

        SignatureDecodeException

        +
        public SignatureDecodeException​(java.lang.Throwable cause)
        +
      • +
      + + + +
        +
      • +

        SignatureDecodeException

        +
        public SignatureDecodeException​(java.lang.String message,
        +                                java.lang.Throwable cause)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/TransactionSignature.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/TransactionSignature.html new file mode 100644 index 000000000..214de9638 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/TransactionSignature.html @@ -0,0 +1,573 @@ + + + + + +TransactionSignature (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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 Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        TransactionSignature

        +
        public TransactionSignature​(java.math.BigInteger r,
        +                            java.math.BigInteger s)
        +
        Constructs a signature with the given components and SIGHASH_ALL.
        +
      • +
      + + + +
        +
      • +

        TransactionSignature

        +
        public TransactionSignature​(java.math.BigInteger r,
        +                            java.math.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 Detail

      + + + +
        +
      • +

        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()
        +
      • +
      + + + + + + + +
        +
      • +

        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-alpha3/org/bitcoinj/crypto/TrustStoreLoader.DefaultTrustStoreLoader.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/TrustStoreLoader.DefaultTrustStoreLoader.html new file mode 100644 index 000000000..705f62d63 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/TrustStoreLoader.DefaultTrustStoreLoader.html @@ -0,0 +1,356 @@ + + + + + +TrustStoreLoader.DefaultTrustStoreLoader (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class TrustStoreLoader.DefaultTrustStoreLoader

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.TrustStoreLoader.DefaultTrustStoreLoader
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        DefaultTrustStoreLoader

        +
        public DefaultTrustStoreLoader()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getKeyStore

        +
        public java.security.KeyStore getKeyStore()
        +                                   throws java.io.FileNotFoundException,
        +                                          java.security.KeyStoreException
        +
        +
        Specified by:
        +
        getKeyStore in interface TrustStoreLoader
        +
        Throws:
        +
        java.io.FileNotFoundException
        +
        java.security.KeyStoreException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/TrustStoreLoader.FileTrustStoreLoader.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/TrustStoreLoader.FileTrustStoreLoader.html new file mode 100644 index 000000000..7a5cf1d69 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/TrustStoreLoader.FileTrustStoreLoader.html @@ -0,0 +1,362 @@ + + + + + +TrustStoreLoader.FileTrustStoreLoader (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class TrustStoreLoader.FileTrustStoreLoader

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.TrustStoreLoader.FileTrustStoreLoader
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FileTrustStoreLoader

        +
        public FileTrustStoreLoader​(@Nonnull
        +                            java.io.File path)
        +                     throws java.io.FileNotFoundException
        +
        +
        Throws:
        +
        java.io.FileNotFoundException
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getKeyStore

        +
        public java.security.KeyStore getKeyStore()
        +                                   throws java.io.FileNotFoundException,
        +                                          java.security.KeyStoreException
        +
        +
        Specified by:
        +
        getKeyStore in interface TrustStoreLoader
        +
        Throws:
        +
        java.io.FileNotFoundException
        +
        java.security.KeyStoreException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/TrustStoreLoader.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/TrustStoreLoader.html new file mode 100644 index 000000000..f49a6ee37 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/TrustStoreLoader.html @@ -0,0 +1,351 @@ + + + + + +TrustStoreLoader (bitcoinj-core 0.17-SNAPSHOT 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.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        DEFAULT_KEYSTORE_TYPE

        +
        static final java.lang.String DEFAULT_KEYSTORE_TYPE
        +
      • +
      + + + +
        +
      • +

        DEFAULT_KEYSTORE_PASSWORD

        +
        static final java.lang.String DEFAULT_KEYSTORE_PASSWORD
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getKeyStore

        +
        java.security.KeyStore getKeyStore()
        +                            throws java.io.FileNotFoundException,
        +                                   java.security.KeyStoreException
        +
        +
        Throws:
        +
        java.io.FileNotFoundException
        +
        java.security.KeyStoreException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/X509Utils.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/X509Utils.html new file mode 100644 index 000000000..979d68e38 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/X509Utils.html @@ -0,0 +1,350 @@ + + + + + +X509Utils (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class X509Utils

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.X509Utils
    • +
    +
  • +
+
+
    +
  • +
    +
    public class X509Utils
    +extends java.lang.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 Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      X509Utils() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static java.lang.StringgetDisplayNameFromCertificate​(java.security.cert.X509Certificate certificate, + boolean withLocation) +
      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.
      +
      static java.security.KeyStoreloadKeyStore​(java.lang.String keystoreType, + java.lang.String keystorePassword, + java.io.InputStream is) +
      Returns a key store loaded from the given stream.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        X509Utils

        +
        public X509Utils()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getDisplayNameFromCertificate

        +
        @Nullable
        +public static java.lang.String getDisplayNameFromCertificate​(@Nonnull
        +                                                             java.security.cert.X509Certificate certificate,
        +                                                             boolean withLocation)
        +                                                      throws java.security.cert.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:
        +
        java.security.cert.CertificateParsingException
        +
        +
      • +
      + + + +
        +
      • +

        loadKeyStore

        +
        public static java.security.KeyStore loadKeyStore​(java.lang.String keystoreType,
        +                                                  @Nullable
        +                                                  java.lang.String keystorePassword,
        +                                                  java.io.InputStream is)
        +                                           throws java.security.KeyStoreException
        +
        Returns a key store loaded from the given stream. Just a convenience around the Java APIs.
        +
        +
        Throws:
        +
        java.security.KeyStoreException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/internal/CryptoUtils.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/internal/CryptoUtils.html new file mode 100644 index 000000000..0c3a5e56f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/internal/CryptoUtils.html @@ -0,0 +1,337 @@ + + + + + +CryptoUtils (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CryptoUtils

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.internal.CryptoUtils
    • +
    +
  • +
+
+
    +
  • +
    +
    public class CryptoUtils
    +extends java.lang.Object
    +
    Utilities for the crypto module (e.g. using Bouncy Castle)
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      CryptoUtils() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static byte[]digestRipeMd160​(byte[] input) +
      Calculate RIPEMD160(input).
      +
      static byte[]sha256hash160​(byte[] input) +
      Calculate RIPEMD160(SHA256(input)).
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        CryptoUtils

        +
        public CryptoUtils()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/crypto/internal/TorUtils.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/internal/TorUtils.html new file mode 100644 index 000000000..d7be1cb74 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/internal/TorUtils.html @@ -0,0 +1,366 @@ + + + + + +TorUtils (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class TorUtils

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.internal.TorUtils
    • +
    +
  • +
+
+
    +
  • +
    +
    public class TorUtils
    +extends java.lang.Object
    +
    Utilities for encoding and decoding Onion addresses.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      TorUtils() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static byte[]decodeOnionUrl​(java.lang.String onionUrl) +
      Decode an Onion URL into a Tor V2 or V3 address.
      +
      static java.lang.StringencodeOnionUrlV2​(byte[] onionAddrBytes) +
      Encode an Onion URL from a Tor V2 address.
      +
      static java.lang.StringencodeOnionUrlV3​(byte[] onionAddrBytes) +
      Encode an Onion URL from a Tor V3 address (pubkey).
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        TorUtils

        +
        public TorUtils()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        encodeOnionUrlV2

        +
        public static java.lang.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 java.lang.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​(java.lang.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-alpha3/org/bitcoinj/crypto/internal/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/internal/package-summary.html new file mode 100644 index 000000000..64c12ba99 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/internal/package-summary.html @@ -0,0 +1,172 @@ + + + + + +org.bitcoinj.crypto.internal (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.crypto.internal

+
+
+
    +
  • + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    CryptoUtils +
    Utilities for the crypto module (e.g.
    +
    TorUtils +
    Utilities for encoding and decoding Onion addresses.
    +
    +
  • +
+
+
+
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/internal/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/internal/package-tree.html new file mode 100644 index 000000000..2ebe80401 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/internal/package-tree.html @@ -0,0 +1,162 @@ + + + + + +org.bitcoinj.crypto.internal Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.crypto.internal

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+
    +
  • java.lang.Object + +
  • +
+
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/package-summary.html new file mode 100644 index 000000000..01fc35c6f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/package-summary.html @@ -0,0 +1,432 @@ + + + + + +org.bitcoinj.crypto (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

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-alpha3/org/bitcoinj/crypto/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/package-tree.html new file mode 100644 index 000000000..8ed84fdff --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/package-tree.html @@ -0,0 +1,263 @@ + + + + + +org.bitcoinj.crypto Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.crypto

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Hierarchy

+
    +
  • java.lang.Object + +
  • +
+
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/utils/MessageVerifyUtils.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/utils/MessageVerifyUtils.html new file mode 100644 index 000000000..4d48c736c --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/utils/MessageVerifyUtils.html @@ -0,0 +1,333 @@ + + + + + +MessageVerifyUtils (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MessageVerifyUtils

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.crypto.utils.MessageVerifyUtils
    • +
    +
  • +
+
+
    +
  • +
    +
    public class MessageVerifyUtils
    +extends java.lang.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…)
    • +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static voidverifyMessage​(Address address, + java.lang.String message, + java.lang.String signatureBase64) +
      Verifies messages signed with private keys of Bitcoin addresses.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        SIGNATURE_FAILED_ERROR_MESSAGE

        +
        public static final java.lang.String SIGNATURE_FAILED_ERROR_MESSAGE
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        verifyMessage

        +
        public static void verifyMessage​(Address address,
        +                                 java.lang.String message,
        +                                 java.lang.String signatureBase64)
        +                          throws java.security.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:
        +
        java.security.SignatureException - if the signature does not match the message and the address
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/crypto/utils/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/utils/package-summary.html new file mode 100644 index 000000000..9cb34a655 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/utils/package-summary.html @@ -0,0 +1,167 @@ + + + + + +org.bitcoinj.crypto.utils (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.crypto.utils

+
+
+
    +
  • + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    MessageVerifyUtils +
    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-alpha3/org/bitcoinj/crypto/utils/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/crypto/utils/package-tree.html new file mode 100644 index 000000000..8a816ed75 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/crypto/utils/package-tree.html @@ -0,0 +1,161 @@ + + + + + +org.bitcoinj.crypto.utils Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.crypto.utils

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeBlockChainListener.html b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeBlockChainListener.html new file mode 100644 index 000000000..2c9ec38ba --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeBlockChainListener.html @@ -0,0 +1,517 @@ + + + + + +NativeBlockChainListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class NativeBlockChainListener

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.jni.NativeBlockChainListener
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        ptr

        +
        public long ptr
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NativeBlockChainListener

        +
        public NativeBlockChainListener()
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeFutureCallback.html b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeFutureCallback.html new file mode 100644 index 000000000..5fdc099f4 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeFutureCallback.html @@ -0,0 +1,392 @@ + + + + + +NativeFutureCallback (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class NativeFutureCallback

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.jni.NativeFutureCallback
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.google.common.util.concurrent.FutureCallback
    +
    +
    +
    @Deprecated
    +public class NativeFutureCallback
    +extends java.lang.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 Summary

      + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      longptr +
      Deprecated.
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      NativeFutureCallback() +
      Deprecated.
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      voidonFailure​(java.lang.Throwable throwable) +
      Deprecated.
      voidonSuccess​(java.lang.Object o) +
      Deprecated.
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        ptr

        +
        public long ptr
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NativeFutureCallback

        +
        public NativeFutureCallback()
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onSuccess

        +
        public void onSuccess​(java.lang.Object o)
        +
        Deprecated.
        +
        +
        Specified by:
        +
        onSuccess in interface com.google.common.util.concurrent.FutureCallback
        +
        +
      • +
      + + + +
        +
      • +

        onFailure

        +
        public void onFailure​(java.lang.Throwable throwable)
        +
        Deprecated.
        +
        +
        Specified by:
        +
        onFailure in interface com.google.common.util.concurrent.FutureCallback
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeKeyChainEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeKeyChainEventListener.html new file mode 100644 index 000000000..443a23779 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeKeyChainEventListener.html @@ -0,0 +1,377 @@ + + + + + +NativeKeyChainEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class NativeKeyChainEventListener

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.jni.NativeKeyChainEventListener
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    KeyChainEventListener
    +
    +
    +
    @Deprecated
    +public class NativeKeyChainEventListener
    +extends java.lang.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 TypeFieldDescription
      longptr +
      Deprecated.
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      voidonKeysAdded​(java.util.List<ECKey> keys) +
      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 Detail

      + + + +
        +
      • +

        ptr

        +
        public long ptr
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NativeKeyChainEventListener

        +
        public NativeKeyChainEventListener()
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onKeysAdded

        +
        public void onKeysAdded​(java.util.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-alpha3/org/bitcoinj/jni/NativeScriptsChangeEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeScriptsChangeEventListener.html new file mode 100644 index 000000000..fcf1d58de --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeScriptsChangeEventListener.html @@ -0,0 +1,379 @@ + + + + + +NativeScriptsChangeEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class NativeScriptsChangeEventListener

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.jni.NativeScriptsChangeEventListener
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    ScriptsChangeEventListener
    +
    +
    +
    @Deprecated
    +public class NativeScriptsChangeEventListener
    +extends java.lang.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 Summary

      + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      longptr +
      Deprecated.
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      voidonScriptsChanged​(Wallet wallet, + java.util.List<Script> scripts, + boolean isAddingScripts) +
      Deprecated.
      +
      Called whenever a new watched script is added to the wallet.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        ptr

        +
        public long ptr
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NativeScriptsChangeEventListener

        +
        public NativeScriptsChangeEventListener()
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onScriptsChanged

        +
        public void onScriptsChanged​(Wallet wallet,
        +                             java.util.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-alpha3/org/bitcoinj/jni/NativeTransactionConfidenceEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeTransactionConfidenceEventListener.html new file mode 100644 index 000000000..01882e3d0 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeTransactionConfidenceEventListener.html @@ -0,0 +1,399 @@ + + + + + +NativeTransactionConfidenceEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class NativeTransactionConfidenceEventListener

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.jni.NativeTransactionConfidenceEventListener
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    TransactionConfidenceEventListener
    +
    +
    +
    @Deprecated
    +public class NativeTransactionConfidenceEventListener
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        ptr

        +
        public long ptr
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NativeTransactionConfidenceEventListener

        +
        public NativeTransactionConfidenceEventListener()
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/jni/NativeTransactionConfidenceListener.html b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeTransactionConfidenceListener.html new file mode 100644 index 000000000..ed7edea7a --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeTransactionConfidenceListener.html @@ -0,0 +1,390 @@ + + + + + +NativeTransactionConfidenceListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class NativeTransactionConfidenceListener

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.jni.NativeTransactionConfidenceListener
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    TransactionConfidence.Listener
    +
    +
    +
    @Deprecated
    +public class NativeTransactionConfidenceListener
    +extends java.lang.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-alpha3/org/bitcoinj/jni/NativeWalletChangeEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeWalletChangeEventListener.html new file mode 100644 index 000000000..1bdba014f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeWalletChangeEventListener.html @@ -0,0 +1,389 @@ + + + + + +NativeWalletChangeEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class NativeWalletChangeEventListener

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.jni.NativeWalletChangeEventListener
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    WalletChangeEventListener
    +
    +
    +
    @Deprecated
    +public class NativeWalletChangeEventListener
    +extends java.lang.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 Summary

      + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      longptr +
      Deprecated.
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      voidonWalletChanged​(Wallet wallet) +
      Deprecated.
      +
      Designed for GUI applications to refresh their transaction lists.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        ptr

        +
        public long ptr
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NativeWalletChangeEventListener

        +
        public NativeWalletChangeEventListener()
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/jni/NativeWalletCoinsReceivedEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeWalletCoinsReceivedEventListener.html new file mode 100644 index 000000000..02247bad4 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeWalletCoinsReceivedEventListener.html @@ -0,0 +1,391 @@ + + + + + +NativeWalletCoinsReceivedEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class NativeWalletCoinsReceivedEventListener

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.jni.NativeWalletCoinsReceivedEventListener
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    WalletCoinsReceivedEventListener
    +
    +
    +
    @Deprecated
    +public class NativeWalletCoinsReceivedEventListener
    +extends java.lang.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 TypeFieldDescription
      longptr +
      Deprecated.
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      voidonCoinsReceived​(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 Detail

      + + + +
        +
      • +

        ptr

        +
        public long ptr
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NativeWalletCoinsReceivedEventListener

        +
        public NativeWalletCoinsReceivedEventListener()
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/jni/NativeWalletCoinsSentEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeWalletCoinsSentEventListener.html new file mode 100644 index 000000000..0a92bd6c3 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeWalletCoinsSentEventListener.html @@ -0,0 +1,394 @@ + + + + + +NativeWalletCoinsSentEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class NativeWalletCoinsSentEventListener

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.jni.NativeWalletCoinsSentEventListener
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    WalletCoinsSentEventListener
    +
    +
    +
    @Deprecated
    +public class NativeWalletCoinsSentEventListener
    +extends java.lang.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 TypeFieldDescription
      longptr +
      Deprecated.
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      voidonCoinsSent​(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 Detail

      + + + +
        +
      • +

        ptr

        +
        public long ptr
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NativeWalletCoinsSentEventListener

        +
        public NativeWalletCoinsSentEventListener()
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/jni/NativeWalletReorganizeEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeWalletReorganizeEventListener.html new file mode 100644 index 000000000..ba74a3a5d --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/jni/NativeWalletReorganizeEventListener.html @@ -0,0 +1,381 @@ + + + + + +NativeWalletReorganizeEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class NativeWalletReorganizeEventListener

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.jni.NativeWalletReorganizeEventListener
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    WalletReorganizeEventListener
    +
    +
    +
    @Deprecated
    +public class NativeWalletReorganizeEventListener
    +extends java.lang.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 TypeFieldDescription
      longptr +
      Deprecated.
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      voidonReorganize​(Wallet wallet) +
      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 Detail

      + + + +
        +
      • +

        ptr

        +
        public long ptr
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NativeWalletReorganizeEventListener

        +
        public NativeWalletReorganizeEventListener()
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/jni/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/jni/package-summary.html new file mode 100644 index 000000000..48bdfb556 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/jni/package-summary.html @@ -0,0 +1,220 @@ + + + + + +org.bitcoinj.jni (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.jni

+
+
+ +
+
+
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/jni/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/jni/package-tree.html new file mode 100644 index 000000000..8a57c16ed --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/jni/package-tree.html @@ -0,0 +1,170 @@ + + + + + +org.bitcoinj.jni Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.jni

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/kits/WalletAppKit.html b/javadoc/0.17-alpha3/org/bitcoinj/kits/WalletAppKit.html new file mode 100644 index 000000000..2c578ea9a --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/kits/WalletAppKit.html @@ -0,0 +1,1430 @@ + + + + + +WalletAppKit (bitcoinj-core 0.17-SNAPSHOT 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, java.io.Closeable, java.lang.AutoCloseable
    +
    +
    +
    public class WalletAppKit
    +extends com.google.common.util.concurrent.AbstractIdleService
    +implements java.io.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 Detail

      + + + +
        +
      • +

        log

        +
        protected static final org.slf4j.Logger log
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        preferredOutputScriptType

        +
        protected final ScriptType preferredOutputScriptType
        +
      • +
      + + + + + + + +
        +
      • +

        filePrefix

        +
        protected final java.lang.String filePrefix
        +
      • +
      + + + +
        +
      • +

        vChain

        +
        protected volatile BlockChain vChain
        +
      • +
      + + + + + + + +
        +
      • +

        vWallet

        +
        protected volatile Wallet vWallet
        +
      • +
      + + + +
        +
      • +

        vPeerGroup

        +
        protected volatile PeerGroup vPeerGroup
        +
      • +
      + + + +
        +
      • +

        directory

        +
        protected final java.io.File directory
        +
      • +
      + + + +
        +
      • +

        vWalletFile

        +
        protected volatile java.io.File vWalletFile
        +
      • +
      + + + +
        +
      • +

        useAutoSave

        +
        protected boolean useAutoSave
        +
      • +
      + + + +
        +
      • +

        peerAddresses

        +
        protected PeerAddress[] peerAddresses
        +
      • +
      + + + + + + + +
        +
      • +

        autoStop

        +
        protected boolean autoStop
        +
      • +
      + + + +
        +
      • +

        checkpoints

        +
        protected java.io.InputStream checkpoints
        +
      • +
      + + + +
        +
      • +

        blockingStartup

        +
        protected boolean blockingStartup
        +
      • +
      + + + +
        +
      • +

        userAgent

        +
        protected java.lang.String userAgent
        +
      • +
      + + + +
        +
      • +

        version

        +
        protected java.lang.String version
        +
      • +
      + + + + + + + + + + + + + + + + +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        launch

        +
        public static WalletAppKit launch​(BitcoinNetwork network,
        +                                  java.io.File directory,
        +                                  java.lang.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,
        +                                  java.io.File directory,
        +                                  java.lang.String filePrefix,
        +                                  java.util.function.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,
        +                                  java.io.File directory,
        +                                  java.lang.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,
        +                                  java.io.File directory,
        +                                  java.lang.String filePrefix,
        +                                  java.util.function.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​(java.io.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​(java.lang.String userAgent,
        +                                 java.lang.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"
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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 java.util.List<WalletExtension> provideWalletExtensions()
        +                                                           throws java.lang.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:
        +
        java.lang.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 java.io.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:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        startUp

        +
        protected void startUp()
        +                throws java.lang.Exception
        +
        +
        Specified by:
        +
        startUp in class com.google.common.util.concurrent.AbstractIdleService
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      + + + +
        +
      • +

        setupAutoSave

        +
        protected void setupAutoSave​(Wallet wallet)
        +
      • +
      + + + +
        +
      • +

        createWallet

        +
        protected Wallet createWallet()
        +
      • +
      + + + +
        +
      • +

        createPeerGroup

        +
        protected PeerGroup createPeerGroup()
        +
      • +
      + + + +
        +
      • +

        shutDown

        +
        protected void shutDown()
        +                 throws java.lang.Exception
        +
        +
        Specified by:
        +
        shutDown in class com.google.common.util.concurrent.AbstractIdleService
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      + + + +
        +
      • +

        close

        +
        public void close()
        +
        Close and release resources. Implements Closeable. This should be idempotent.
        +
        +
        Specified by:
        +
        close in interface java.lang.AutoCloseable
        +
        Specified by:
        +
        close in interface java.io.Closeable
        +
        +
      • +
      + + + + + + + + + + + + + + + + + + + +
        +
      • +

        wallet

        +
        public Wallet wallet()
        +
      • +
      + + + +
        +
      • +

        peerGroup

        +
        public PeerGroup peerGroup()
        +
      • +
      + + + +
        +
      • +

        directory

        +
        public java.io.File directory()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/kits/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/kits/package-summary.html new file mode 100644 index 000000000..96de109d5 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/kits/package-summary.html @@ -0,0 +1,172 @@ + + + + + +org.bitcoinj.kits (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

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.
+
+
    +
  • + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    WalletAppKit +
    Utility class that wraps the boilerplate needed to set up a new SPV bitcoinj app.
    +
    +
  • +
+
+
+
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/kits/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/kits/package-tree.html new file mode 100644 index 000000000..8468488b3 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/kits/package-tree.html @@ -0,0 +1,165 @@ + + + + + +org.bitcoinj.kits Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT 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) +
        +
      • org.bitcoinj.kits.WalletAppKit (implements java.io.Closeable)
      • +
      +
    • +
    +
  • +
+
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/net/AbstractTimeoutHandler.html b/javadoc/0.17-alpha3/org/bitcoinj/net/AbstractTimeoutHandler.html new file mode 100644 index 000000000..6ec608e69 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/AbstractTimeoutHandler.html @@ -0,0 +1,400 @@ + + + + + +AbstractTimeoutHandler (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class AbstractTimeoutHandler

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.net.AbstractTimeoutHandler
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    TimeoutHandler
    +
    +
    +
    @Deprecated
    +public abstract class AbstractTimeoutHandler
    +extends java.lang.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 
      ConstructorDescription
      AbstractTimeoutHandler() +
      Deprecated.
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      protected voidresetTimeout() +
      Deprecated.
      +
      Resets the current progress towards timeout to 0.
      +
      voidsetSocketTimeout​(java.time.Duration timeout) +
      Deprecated.
      +
      Sets the receive timeout, automatically killing the connection if no + messages are received for this long
      +
      voidsetTimeoutEnabled​(boolean timeoutEnabled) +
      Deprecated.
      +
      Enables or disables the timeout entirely.
      +
      protected abstract voidtimeoutOccurred() +
      Deprecated.
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        AbstractTimeoutHandler

        +
        public AbstractTimeoutHandler()
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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​(java.time.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-alpha3/org/bitcoinj/net/BlockingClient.html b/javadoc/0.17-alpha3/org/bitcoinj/net/BlockingClient.html new file mode 100644 index 000000000..599c94a17 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/BlockingClient.html @@ -0,0 +1,416 @@ + + + + + +BlockingClient (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BlockingClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.net.BlockingClient
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      BlockingClient​(java.net.SocketAddress serverAddress, + StreamConnection connection, + java.time.Duration connectTimeout, + javax.net.SocketFactory socketFactory, + java.util.Set<BlockingClient> clientSet) +
      Creates a new client to the given server address using the given StreamConnection to decode the data.
      +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BlockingClient

        +
        public BlockingClient​(java.net.SocketAddress serverAddress,
        +                      StreamConnection connection,
        +                      java.time.Duration connectTimeout,
        +                      javax.net.SocketFactory socketFactory,
        +                      @Nullable
        +                      java.util.Set<BlockingClient> clientSet)
        +               throws java.io.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:
        +
        java.io.IOException
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        runReadLoop

        +
        public static void runReadLoop​(java.io.InputStream stream,
        +                               StreamConnection connection)
        +                        throws java.lang.Exception
        +
        A blocking call that never returns, except by throwing an exception. It reads bytes from the input stream + and feeds them to the provided StreamConnection, for example, a Peer.
        +
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      + + + + + + + +
        +
      • +

        writeBytes

        +
        public ListenableCompletableFuture<java.lang.Void> writeBytes​(byte[] message)
        +                                                       throws java.io.IOException
        +
        Description copied from interface: MessageWriteTarget
        +
        Writes the given bytes to the remote server. The returned future will complete when all bytes + have been written to the OS network buffer.
        +
        +
        Specified by:
        +
        writeBytes in interface MessageWriteTarget
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        getConnectFuture

        +
        public ListenableCompletableFuture<java.net.SocketAddress> getConnectFuture()
        +
        Returns a future that completes once connection has occurred at the socket level or with an exception if failed to connect.
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/net/BlockingClientManager.html b/javadoc/0.17-alpha3/org/bitcoinj/net/BlockingClientManager.html new file mode 100644 index 000000000..95eb079a5 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/BlockingClientManager.html @@ -0,0 +1,507 @@ + + + + + +BlockingClientManager (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BlockingClientManager

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • com.google.common.util.concurrent.AbstractIdleService
    • +
    • +
        +
      • org.bitcoinj.net.BlockingClientManager
      • +
      +
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      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 
      ConstructorDescription
      BlockingClientManager() 
      BlockingClientManager​(javax.net.SocketFactory socketFactory) +
      Creates a blocking client manager that will obtain sockets from the given factory.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      voidcloseConnections​(int n) +
      Closes n peer connections
      +
      intgetConnectedClientCount() +
      Gets the number of connected peers
      +
      ListenableCompletableFuture<java.net.SocketAddress>openConnection​(java.net.SocketAddress serverAddress, + StreamConnection connection) +
      Creates a new connection to the given address, with the given connection used to handle incoming data.
      +
      voidsetConnectTimeout​(java.time.Duration connectTimeout) +
      Sets the number of milliseconds to wait before giving up on a connect attempt
      +
      voidsetConnectTimeoutMillis​(int connectTimeoutMillis) +
      Deprecated. + +
      +
      protected voidshutDown() 
      protected voidstartUp() 
      +
        +
      • + + +

        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 Detail

      + + + +
        +
      • +

        BlockingClientManager

        +
        public BlockingClientManager()
        +
      • +
      + + + +
        +
      • +

        BlockingClientManager

        +
        public BlockingClientManager​(javax.net.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 Detail

      + + + +
        +
      • +

        openConnection

        +
        public ListenableCompletableFuture<java.net.SocketAddress> openConnection​(java.net.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​(java.time.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 java.lang.Exception
        +
        +
        Specified by:
        +
        startUp in class com.google.common.util.concurrent.AbstractIdleService
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      + + + +
        +
      • +

        shutDown

        +
        protected void shutDown()
        +                 throws java.lang.Exception
        +
        +
        Specified by:
        +
        shutDown in class com.google.common.util.concurrent.AbstractIdleService
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      + + + + + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/net/ClientConnectionManager.html b/javadoc/0.17-alpha3/org/bitcoinj/net/ClientConnectionManager.html new file mode 100644 index 000000000..506afff53 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/ClientConnectionManager.html @@ -0,0 +1,326 @@ + + + + + +ClientConnectionManager (bitcoinj-core 0.17-SNAPSHOT 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

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      voidcloseConnections​(int n) +
      Closes n peer connections
      +
      intgetConnectedClientCount() +
      Gets the number of connected peers
      +
      ListenableCompletableFuture<java.net.SocketAddress>openConnection​(java.net.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 Detail

      + + + +
        +
      • +

        openConnection

        +
        ListenableCompletableFuture<java.net.SocketAddress> openConnection​(java.net.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-alpha3/org/bitcoinj/net/FilterMerger.Result.html b/javadoc/0.17-alpha3/org/bitcoinj/net/FilterMerger.Result.html new file mode 100644 index 000000000..155567839 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/FilterMerger.Result.html @@ -0,0 +1,340 @@ + + + + + +FilterMerger.Result (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FilterMerger.Result

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.net.FilterMerger.Result
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    FilterMerger
    +
    +
    +
    public static class FilterMerger.Result
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Result() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + + + + + +
        +
      • +

        earliestKeyTime

        +
        public java.time.Instant earliestKeyTime
        +
      • +
      + + + +
        +
      • +

        changed

        +
        public boolean changed
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Result

        +
        public Result()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/net/FilterMerger.html b/javadoc/0.17-alpha3/org/bitcoinj/net/FilterMerger.html new file mode 100644 index 000000000..afb2e0682 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/FilterMerger.html @@ -0,0 +1,383 @@ + + + + + +FilterMerger (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FilterMerger

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.net.FilterMerger
    • +
    +
  • +
+
+
    +
  • +
    +
    public class FilterMerger
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        FilterMerger

        +
        public FilterMerger​(double bloomFilterFPRate)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        setBloomFilterFPRate

        +
        @Deprecated
        +public void setBloomFilterFPRate​(double bloomFilterFPRate)
        +
        Deprecated.
        +
      • +
      + + + +
        +
      • +

        getBloomFilterFPRate

        +
        public double getBloomFilterFPRate()
        +
      • +
      + + + +
        +
      • +

        getLastFilter

        +
        public BloomFilter getLastFilter()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/net/MessageWriteTarget.html b/javadoc/0.17-alpha3/org/bitcoinj/net/MessageWriteTarget.html new file mode 100644 index 000000000..f424da92d --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/MessageWriteTarget.html @@ -0,0 +1,281 @@ + + + + + +MessageWriteTarget (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        writeBytes

        +
        ListenableCompletableFuture<java.lang.Void> writeBytes​(byte[] message)
        +                                                throws java.io.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:
        +
        java.io.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-alpha3/org/bitcoinj/net/NioClient.html b/javadoc/0.17-alpha3/org/bitcoinj/net/NioClient.html new file mode 100644 index 000000000..8b100caf1 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/NioClient.html @@ -0,0 +1,365 @@ + + + + + +NioClient (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class NioClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.net.NioClient
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      NioClient​(java.net.SocketAddress serverAddress, + StreamConnection parser, + java.time.Duration connectTimeout) +
      Creates a new client to the given server address using the given StreamConnection to decode the data.
      +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NioClient

        +
        public NioClient​(java.net.SocketAddress serverAddress,
        +                 StreamConnection parser,
        +                 java.time.Duration connectTimeout)
        +          throws java.io.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:
        +
        serverAddress - socket address of the server to connect to
        +
        parser - parses data from the server
        +
        connectTimeout - timeout for establishing a connection to the server, or ZERO for no timeout
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/net/NioClientManager.html b/javadoc/0.17-alpha3/org/bitcoinj/net/NioClientManager.html new file mode 100644 index 000000000..1c18f5eeb --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/NioClientManager.html @@ -0,0 +1,460 @@ + + + + + +NioClientManager (bitcoinj-core 0.17-SNAPSHOT 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 
      ConstructorDescription
      NioClientManager() +
      Creates a new client manager which uses Java NIO for socket management.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidcloseConnections​(int n) +
      Closes n peer connections
      +
      protected java.util.concurrent.Executorexecutor() 
      intgetConnectedClientCount() +
      Gets the number of connected peers
      +
      ListenableCompletableFuture<java.net.SocketAddress>openConnection​(java.net.SocketAddress serverAddress, + StreamConnection connection) +
      Creates a new connection to the given address, with the given connection used to handle incoming data.
      +
      voidrun() 
      voidtriggerShutdown() 
      +
        +
      • + + +

        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 Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        run

        +
        public void run()
        +
        +
        Specified by:
        +
        run in class com.google.common.util.concurrent.AbstractExecutionThreadService
        +
        +
      • +
      + + + +
        +
      • +

        openConnection

        +
        public ListenableCompletableFuture<java.net.SocketAddress> openConnection​(java.net.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
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        executor

        +
        protected java.util.concurrent.Executor executor()
        +
        +
        Overrides:
        +
        executor in class com.google.common.util.concurrent.AbstractExecutionThreadService
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/net/NioServer.html b/javadoc/0.17-alpha3/org/bitcoinj/net/NioServer.html new file mode 100644 index 000000000..36cb3bc9e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/NioServer.html @@ -0,0 +1,381 @@ + + + + + +NioServer (bitcoinj-core 0.17-SNAPSHOT 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
      • +
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      protected voidrun() 
      voidtriggerShutdown() +
      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 Detail

      + + + +
        +
      • +

        NioServer

        +
        public NioServer​(StreamConnectionFactory connectionFactory,
        +                 java.net.InetSocketAddress bindAddress)
        +          throws java.io.IOException
        +
        Creates a new server which is capable of listening for incoming connections and processing client provided data + using StreamConnections created by the given StreamConnectionFactory
        +
        +
        Throws:
        +
        java.io.IOException - If there is an issue opening the server socket or binding fails for some reason
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        run

        +
        protected void run()
        +            throws java.lang.Exception
        +
        +
        Specified by:
        +
        run in class com.google.common.util.concurrent.AbstractExecutionThreadService
        +
        Throws:
        +
        java.lang.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-alpha3/org/bitcoinj/net/SocketTimeoutTask.html b/javadoc/0.17-alpha3/org/bitcoinj/net/SocketTimeoutTask.html new file mode 100644 index 000000000..280ea120f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/SocketTimeoutTask.html @@ -0,0 +1,351 @@ + + + + + +SocketTimeoutTask (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class SocketTimeoutTask

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.net.SocketTimeoutTask
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    TimeoutHandler
    +
    +
    +
    public class SocketTimeoutTask
    +extends java.lang.Object
    +implements TimeoutHandler
    +
    Component that implements the timeout capability of TimeoutHandler.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      SocketTimeoutTask​(java.lang.Runnable actualTask) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidsetSocketTimeout​(java.time.Duration timeout) +
      Sets the receive timeout, automatically killing the connection if no + messages are received for this long
      +
      voidsetTimeoutEnabled​(boolean timeoutEnabled) +
      Enables or disables the timeout entirely.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        SocketTimeoutTask

        +
        public SocketTimeoutTask​(java.lang.Runnable actualTask)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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​(java.time.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-alpha3/org/bitcoinj/net/StreamConnection.html b/javadoc/0.17-alpha3/org/bitcoinj/net/StreamConnection.html new file mode 100644 index 000000000..2aac637c6 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/StreamConnection.html @@ -0,0 +1,350 @@ + + + + + +StreamConnection (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface StreamConnection

+
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      voidconnectionClosed() +
      Called when the connection socket is closed
      +
      voidconnectionOpened() +
      Called when the connection socket is first opened
      +
      intgetMaxMessageSize() +
      Returns the maximum message size of a message on the socket.
      +
      intreceiveBytes​(java.nio.ByteBuffer buff) +
      Called when new bytes are available from the remote end.
      +
      voidsetWriteTarget​(MessageWriteTarget writeTarget) +
      Called when this connection is attached to an upstream write target (ie a low-level connection handler).
      +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        connectionClosed

        +
        void connectionClosed()
        +
        Called when the connection socket is closed
        +
      • +
      + + + +
        +
      • +

        connectionOpened

        +
        void connectionOpened()
        +
        Called when the connection socket is first opened
        +
      • +
      + + + +
        +
      • +

        receiveBytes

        +
        int receiveBytes​(java.nio.ByteBuffer buff)
        +          throws java.lang.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:
        +
        java.lang.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-alpha3/org/bitcoinj/net/StreamConnectionFactory.html b/javadoc/0.17-alpha3/org/bitcoinj/net/StreamConnectionFactory.html new file mode 100644 index 000000000..483639ff6 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/StreamConnectionFactory.html @@ -0,0 +1,260 @@ + + + + + +StreamConnectionFactory (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface StreamConnectionFactory

+
+
+
+
    +
  • +
    +
    public interface StreamConnectionFactory
    +
    A factory which generates new StreamConnections when a new connection is opened.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getNewConnection

        +
        @Nullable
        +StreamConnection getNewConnection​(java.net.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-alpha3/org/bitcoinj/net/TimeoutHandler.html b/javadoc/0.17-alpha3/org/bitcoinj/net/TimeoutHandler.html new file mode 100644 index 000000000..e6546087e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/TimeoutHandler.html @@ -0,0 +1,287 @@ + + + + + +TimeoutHandler (bitcoinj-core 0.17-SNAPSHOT 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

      + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      voidsetSocketTimeout​(java.time.Duration timeout) +
      Sets the receive timeout, automatically killing the connection if no + messages are received for this long
      +
      voidsetTimeoutEnabled​(boolean timeoutEnabled) +
      Enables or disables the timeout entirely.
      +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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​(java.time.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-alpha3/org/bitcoinj/net/discovery/DnsDiscovery.DnsSeedDiscovery.html b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/DnsDiscovery.DnsSeedDiscovery.html new file mode 100644 index 000000000..d2704c50a --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/DnsDiscovery.DnsSeedDiscovery.html @@ -0,0 +1,404 @@ + + + + + +DnsDiscovery.DnsSeedDiscovery (bitcoinj-core 0.17-SNAPSHOT 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 java.lang.Object
    +implements PeerDiscovery
    +
    Implements discovery from a single DNS host.
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.util.List<java.net.InetSocketAddress>getPeers​(long services, + java.time.Duration timeout) +
      Queries for addresses.
      +
      voidshutdown() +
      Stops any discovery in progress when we want to shut down quickly.
      +
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Method Detail

      + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/DnsDiscovery.html b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/DnsDiscovery.html new file mode 100644 index 000000000..387093be8 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/DnsDiscovery.html @@ -0,0 +1,456 @@ + + + + + +DnsDiscovery (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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 Detail

      + + + +
        +
      • +

        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​(java.lang.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.
        +
        +
      • +
      + + + + + + + + +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/MultiplexingDiscovery.html b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/MultiplexingDiscovery.html new file mode 100644 index 000000000..3c18a4af5 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/MultiplexingDiscovery.html @@ -0,0 +1,577 @@ + + + + + +MultiplexingDiscovery (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MultiplexingDiscovery

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.net.discovery.MultiplexingDiscovery
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    PeerDiscovery
    +
    +
    +
    Direct Known Subclasses:
    +
    DnsDiscovery
    +
    +
    +
    public class MultiplexingDiscovery
    +extends java.lang.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.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MultiplexingDiscovery

        +
        public MultiplexingDiscovery​(Network network,
        +                             java.util.List<PeerDiscovery> seeds)
        +
        Will query the given seeds in parallel before producing a merged response.
        +
        +
        Parameters:
        +
        network - The network we are querying for
        +
        seeds - Sources to query in parallel
        +
        +
      • +
      + + + + +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        forServices

        +
        public static MultiplexingDiscovery forServices​(Network network,
        +                                                long services)
        +
        Builds a suitable set of peer discoveries. Will query them in parallel before producing a merged response.
        +
        +
        Parameters:
        +
        network - Network to use.
        +
        services - Required services as a bitmask, e.g. Services.NODE_NETWORK.
        +
        +
      • +
      + + + +
        +
      • +

        forServices

        +
        public static MultiplexingDiscovery forServices​(Network network,
        +                                                long services,
        +                                                boolean parallelQueries,
        +                                                boolean shufflePeers)
        +
        Builds a suitable set of peer discoveries.
        +
        +
        Parameters:
        +
        network - Network to use.
        +
        services - Required services as a bitmask, e.g. Services.NODE_NETWORK.
        +
        parallelQueries - When true, seeds are queried in parallel
        +
        shufflePeers - When true, queried peers are shuffled
        +
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        createExecutor

        +
        protected java.util.concurrent.ExecutorService createExecutor()
        +
      • +
      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/net/discovery/PeerDiscovery.html b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/PeerDiscovery.html new file mode 100644 index 000000000..ac57509ff --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/PeerDiscovery.html @@ -0,0 +1,317 @@ + + + + + +PeerDiscovery (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface PeerDiscovery

+
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      default java.util.List<java.net.InetSocketAddress>getPeers​(long services, + long timeoutValue, + java.util.concurrent.TimeUnit timeoutUnit) +
      Deprecated. + +
      +
      java.util.List<java.net.InetSocketAddress>getPeers​(long services, + java.time.Duration timeout) +
      Queries for addresses.
      +
      voidshutdown() +
      Stops any discovery in progress when we want to shut down quickly.
      +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getPeers

        +
        java.util.List<java.net.InetSocketAddress> getPeers​(long services,
        +                                                    java.time.Duration timeout)
        +                                             throws PeerDiscoveryException
        +
        Queries for addresses. This method may block.
        +
        +
        Parameters:
        +
        services - required services as a bitmask, e.g. Services.NODE_NETWORK
        +
        timeout - query timeout
        +
        Returns:
        +
        found addresses
        +
        Throws:
        +
        PeerDiscoveryException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        shutdown

        +
        void shutdown()
        +
        Stops any discovery in progress when we want to shut down quickly.
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/PeerDiscoveryException.html b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/PeerDiscoveryException.html new file mode 100644 index 000000000..6e8e45b4a --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/PeerDiscoveryException.html @@ -0,0 +1,332 @@ + + + + + +PeerDiscoveryException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PeerDiscoveryException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.bitcoinj.net.discovery.PeerDiscoveryException
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class PeerDiscoveryException
    +extends java.lang.Exception
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        PeerDiscoveryException

        +
        public PeerDiscoveryException()
        +
      • +
      + + + +
        +
      • +

        PeerDiscoveryException

        +
        public PeerDiscoveryException​(java.lang.String message)
        +
      • +
      + + + +
        +
      • +

        PeerDiscoveryException

        +
        public PeerDiscoveryException​(java.lang.Throwable arg0)
        +
      • +
      + + + +
        +
      • +

        PeerDiscoveryException

        +
        public PeerDiscoveryException​(java.lang.String message,
        +                              java.lang.Throwable arg0)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/SeedPeers.html b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/SeedPeers.html new file mode 100644 index 000000000..83ef51a3f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/SeedPeers.html @@ -0,0 +1,440 @@ + + + + + +SeedPeers (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class SeedPeers

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.net.discovery.SeedPeers
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    PeerDiscovery
    +
    +
    +
    public class SeedPeers
    +extends java.lang.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.
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.net.InetSocketAddressgetPeer() +
      Acts as an iterator, returning the address of each node in the list sequentially.
      +
      java.util.List<java.net.InetSocketAddress>getPeers​(long services, + java.time.Duration timeout) +
      Returns all the Bitcoin nodes within the list.
      +
      voidshutdown() +
      Stops any discovery in progress when we want to shut down quickly.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        SeedPeers

        +
        public SeedPeers​(java.net.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 Detail

      + + + +
        +
      • +

        getPeer

        +
        @Nullable
        +public java.net.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 java.util.List<java.net.InetSocketAddress> getPeers​(long services,
        +                                                           java.time.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-alpha3/org/bitcoinj/net/discovery/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/package-summary.html new file mode 100644 index 000000000..931989e33 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/package-summary.html @@ -0,0 +1,222 @@ + + + + + +org.bitcoinj.net.discovery (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.net.discovery

+
+
+
+ + +
Classes that know how to discover peers in the P2P network using DNS or HTTP.
+
+
    +
  • + + + + + + + + + + + + +
    Interface Summary 
    InterfaceDescription
    PeerDiscovery +
    A PeerDiscovery object is responsible for finding addresses of other nodes in the Bitcoin P2P network.
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    DnsDiscovery +
    Supports peer discovery through DNS.
    +
    DnsDiscovery.DnsSeedDiscovery +
    Implements discovery from a single DNS host.
    +
    MultiplexingDiscovery +
    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.
    +
    SeedPeers +
    SeedPeers stores a pre-determined list of Bitcoin node addresses.
    +
    +
  • +
  • + + + + + + + + + + + + +
    Exception Summary 
    ExceptionDescription
    PeerDiscoveryException 
    +
  • +
+
+
+
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/package-tree.html new file mode 100644 index 000000000..d97188051 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/discovery/package-tree.html @@ -0,0 +1,182 @@ + + + + + +org.bitcoinj.net.discovery Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.net.discovery

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/net/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/net/package-summary.html new file mode 100644 index 000000000..cfd62bdd4 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/package-summary.html @@ -0,0 +1,264 @@ + + + + + +org.bitcoinj.net (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

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-alpha3/org/bitcoinj/net/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/net/package-tree.html new file mode 100644 index 000000000..c0b4a2b50 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/net/package-tree.html @@ -0,0 +1,191 @@ + + + + + +org.bitcoinj.net Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.net

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/params/BitcoinNetworkParams.html b/javadoc/0.17-alpha3/org/bitcoinj/params/BitcoinNetworkParams.html new file mode 100644 index 000000000..e00c650a1 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/params/BitcoinNetworkParams.html @@ -0,0 +1,732 @@ + + + + + +BitcoinNetworkParams (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BitcoinNetworkParams

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BitcoinNetworkParams

        +
        public BitcoinNetworkParams​(BitcoinNetwork network)
        +
        No-args constructor
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        fromID

        +
        @Nullable
        +public static BitcoinNetworkParams fromID​(java.lang.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:
        +
        java.lang.IllegalArgumentException - if unknown network
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        getUriScheme

        +
        @Deprecated
        +public java.lang.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-alpha3/org/bitcoinj/params/MainNetParams.html b/javadoc/0.17-alpha3/org/bitcoinj/params/MainNetParams.html new file mode 100644 index 000000000..777d47056 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/params/MainNetParams.html @@ -0,0 +1,457 @@ + + + + + +MainNetParams (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MainNetParams

+
+
+ +
+
    +
  • +
    +
    public class MainNetParams
    +extends BitcoinNetworkParams
    +
    Parameters for the main production network on which people trade goods and services.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        MAINNET_MAJORITY_WINDOW

        +
        public static final int MAINNET_MAJORITY_WINDOW
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        MAINNET_MAJORITY_REJECT_BLOCK_OUTDATED

        +
        public static final int MAINNET_MAJORITY_REJECT_BLOCK_OUTDATED
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        MAINNET_MAJORITY_ENFORCE_BLOCK_UPGRADE

        +
        public static final int MAINNET_MAJORITY_ENFORCE_BLOCK_UPGRADE
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MainNetParams

        +
        public MainNetParams()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        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-alpha3/org/bitcoinj/params/Networks.html b/javadoc/0.17-alpha3/org/bitcoinj/params/Networks.html new file mode 100644 index 000000000..e2da58e9b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/params/Networks.html @@ -0,0 +1,397 @@ + + + + + +Networks (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Networks

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.params.Networks
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Networks
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        Networks

        +
        public Networks()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        find

        +
        public static java.util.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​(java.util.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-alpha3/org/bitcoinj/params/RegTestParams.html b/javadoc/0.17-alpha3/org/bitcoinj/params/RegTestParams.html new file mode 100644 index 000000000..17e6a17af --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/params/RegTestParams.html @@ -0,0 +1,409 @@ + + + + + +RegTestParams (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        RegTestParams

        +
        public RegTestParams()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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-alpha3/org/bitcoinj/params/SigNetParams.html b/javadoc/0.17-alpha3/org/bitcoinj/params/SigNetParams.html new file mode 100644 index 000000000..dd761a17e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/params/SigNetParams.html @@ -0,0 +1,459 @@ + + + + + +SigNetParams (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        TESTNET_MAJORITY_WINDOW

        +
        public static final int TESTNET_MAJORITY_WINDOW
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED

        +
        public static final int TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE

        +
        public static final int TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SigNetParams

        +
        public SigNetParams()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        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-alpha3/org/bitcoinj/params/TestNet3Params.html b/javadoc/0.17-alpha3/org/bitcoinj/params/TestNet3Params.html new file mode 100644 index 000000000..d65e06ed0 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/params/TestNet3Params.html @@ -0,0 +1,493 @@ + + + + + +TestNet3Params (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        TESTNET_MAJORITY_WINDOW

        +
        public static final int TESTNET_MAJORITY_WINDOW
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED

        +
        public static final int TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE

        +
        public static final int TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TestNet3Params

        +
        public TestNet3Params()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        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-alpha3/org/bitcoinj/params/UnitTestParams.html b/javadoc/0.17-alpha3/org/bitcoinj/params/UnitTestParams.html new file mode 100644 index 000000000..0f6536eac --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/params/UnitTestParams.html @@ -0,0 +1,458 @@ + + + + + +UnitTestParams (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        UNITNET_MAJORITY_WINDOW

        +
        public static final int UNITNET_MAJORITY_WINDOW
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED

        +
        public static final int TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE

        +
        public static final int TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        UnitTestParams

        +
        public UnitTestParams()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        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-alpha3/org/bitcoinj/params/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/params/package-summary.html new file mode 100644 index 000000000..00ecccb38 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/params/package-summary.html @@ -0,0 +1,210 @@ + + + + + +org.bitcoinj.params (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

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.
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    BitcoinNetworkParams +
    Parameters for Bitcoin-like networks.
    +
    MainNetParams +
    Parameters for the main production network on which people trade goods and services.
    +
    Networks +
    Utility class that holds all the registered NetworkParameters types used for address auto discovery.
    +
    RegTestParams +
    Network parameters for the regression test mode of bitcoind in which all blocks are trivially solvable.
    +
    SigNetParams +
    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.
    +
    TestNet3Params +
    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.
    +
    UnitTestParams +
    Network parameters used by the bitcoinj unit tests (and potentially your own).
    +
    +
  • +
+
+
+
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/params/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/params/package-tree.html new file mode 100644 index 000000000..4b3f05403 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/params/package-tree.html @@ -0,0 +1,174 @@ + + + + + +org.bitcoinj.params Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.params

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.Ack.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.Ack.html new file mode 100644 index 000000000..ebe750495 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.Ack.html @@ -0,0 +1,275 @@ + + + + + +PaymentProtocol.Ack (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentProtocol.Ack

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.protocols.payments.PaymentProtocol.Ack
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    PaymentProtocol
    +
    +
    +
    public static class PaymentProtocol.Ack
    +extends java.lang.Object
    +
    Message returned by the merchant in response to a Payment message.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringgetMemo() +
      Returns the memo included by the merchant in the payment ack.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Method Detail

      + + + +
        +
      • +

        getMemo

        +
        @Nullable
        +public java.lang.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-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.Output.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.Output.html new file mode 100644 index 000000000..3fa13abd5 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.Output.html @@ -0,0 +1,331 @@ + + + + + +PaymentProtocol.Output (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentProtocol.Output

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.protocols.payments.PaymentProtocol.Output
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    PaymentProtocol
    +
    +
    +
    public static class PaymentProtocol.Output
    +extends java.lang.Object
    +
    Value object to hold amount/script pairs.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      Coinamount 
      byte[]scriptData 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Output​(Coin amount, + byte[] scriptData) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        amount

        +
        @Nullable
        +public final Coin amount
        +
      • +
      + + + +
        +
      • +

        scriptData

        +
        public final byte[] scriptData
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Output

        +
        public Output​(@Nullable
        +              Coin amount,
        +              byte[] scriptData)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.PkiVerificationData.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.PkiVerificationData.html new file mode 100644 index 000000000..68bb53d16 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.PkiVerificationData.html @@ -0,0 +1,369 @@ + + + + + +PaymentProtocol.PkiVerificationData (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentProtocol.PkiVerificationData

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.protocols.payments.PaymentProtocol.PkiVerificationData
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    PaymentProtocol
    +
    +
    +
    public static class PaymentProtocol.PkiVerificationData
    +extends java.lang.Object
    +
    Information about the X.509 signature's issuer and subject.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      java.lang.StringdisplayName +
      Display name of the payment requestor, could be a domain name, email address, legal name, etc
      +
      java.security.PublicKeymerchantSigningKey +
      SSL public key that was used to sign.
      +
      java.security.cert.TrustAnchorrootAuthority +
      Object representing the CA that verified the merchant's ID
      +
      java.lang.StringrootAuthorityName +
      String representing the display name of the CA that verified the merchant's ID
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        displayName

        +
        public final java.lang.String displayName
        +
        Display name of the payment requestor, could be a domain name, email address, legal name, etc
        +
      • +
      + + + +
        +
      • +

        merchantSigningKey

        +
        public final java.security.PublicKey merchantSigningKey
        +
        SSL public key that was used to sign.
        +
      • +
      + + + +
        +
      • +

        rootAuthority

        +
        public final java.security.cert.TrustAnchor rootAuthority
        +
        Object representing the CA that verified the merchant's ID
        +
      • +
      + + + +
        +
      • +

        rootAuthorityName

        +
        public final java.lang.String rootAuthorityName
        +
        String representing the display name of the CA that verified the merchant's ID
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.html new file mode 100644 index 000000000..958f628f0 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocol.html @@ -0,0 +1,898 @@ + + + + + +PaymentProtocol (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentProtocol

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.protocols.payments.PaymentProtocol
    • +
    +
  • +
+
+
    +
  • +
    +
    public class PaymentProtocol
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        MIMETYPE_PAYMENTREQUEST

        +
        public static final java.lang.String MIMETYPE_PAYMENTREQUEST
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        MIMETYPE_PAYMENT

        +
        public static final java.lang.String MIMETYPE_PAYMENT
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        MIMETYPE_PAYMENTACK

        +
        public static final java.lang.String MIMETYPE_PAYMENTACK
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        PAYMENT_PROTOCOL_ID_MAINNET

        +
        public static final java.lang.String PAYMENT_PROTOCOL_ID_MAINNET
        +
        The string used by the payment protocol to represent the main net.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        PAYMENT_PROTOCOL_ID_TESTNET

        +
        public static final java.lang.String PAYMENT_PROTOCOL_ID_TESTNET
        +
        The string used by the payment protocol to represent the test net.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        PAYMENT_PROTOCOL_ID_SIGNET

        +
        public static final java.lang.String PAYMENT_PROTOCOL_ID_SIGNET
        +
        The string used by the payment protocol to represent signet (note that this is non-standard).
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        PAYMENT_PROTOCOL_ID_UNIT_TESTS

        +
        public static final java.lang.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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        PAYMENT_PROTOCOL_ID_REGTEST

        +
        public static final java.lang.String PAYMENT_PROTOCOL_ID_REGTEST
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PaymentProtocol

        +
        public PaymentProtocol()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        createPaymentRequest

        +
        public static org.bitcoinj.protobuf.payments.Protos.PaymentRequest.Builder createPaymentRequest​(NetworkParameters params,
        +                                                                                                @Nullable
        +                                                                                                Coin amount,
        +                                                                                                Address toAddress,
        +                                                                                                @Nullable
        +                                                                                                java.lang.String memo,
        +                                                                                                @Nullable
        +                                                                                                java.lang.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,
        +                                                                                                java.util.List<org.bitcoinj.protobuf.payments.Protos.Output> outputs,
        +                                                                                                @Nullable
        +                                                                                                java.lang.String memo,
        +                                                                                                @Nullable
        +                                                                                                java.lang.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        signPaymentRequest

        +
        public static void signPaymentRequest​(org.bitcoinj.protobuf.payments.Protos.PaymentRequest.Builder paymentRequest,
        +                                      java.security.cert.X509Certificate[] certificateChain,
        +                                      java.security.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,
        +                                                                          java.security.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​(java.util.List<Transaction> transactions,
        +                                                                                 @Nullable
        +                                                                                 Coin refundAmount,
        +                                                                                 @Nullable
        +                                                                                 Address refundAddress,
        +                                                                                 @Nullable
        +                                                                                 java.lang.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​(java.util.List<Transaction> transactions,
        +                                                                                 @Nullable
        +                                                                                 java.util.List<org.bitcoinj.protobuf.payments.Protos.Output> refundOutputs,
        +                                                                                 @Nullable
        +                                                                                 java.lang.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 java.util.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
        +                                                                                java.lang.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.
        +
      • +
      + + + + + + + +
        +
      • +

        paramsFromPmtProtocolID

        +
        @Nullable
        +public static BitcoinNetworkParams paramsFromPmtProtocolID​(java.lang.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 java.lang.String protocolIdFromParams​(NetworkParameters params)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.Expired.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.Expired.html new file mode 100644 index 000000000..9770c0913 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.Expired.html @@ -0,0 +1,317 @@ + + + + + +PaymentProtocolException.Expired (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentProtocolException.Expired

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Expired

        +
        public Expired​(java.lang.String msg)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidNetwork.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidNetwork.html new file mode 100644 index 000000000..c3a60da98 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidNetwork.html @@ -0,0 +1,317 @@ + + + + + +PaymentProtocolException.InvalidNetwork (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentProtocolException.InvalidNetwork

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InvalidNetwork

        +
        public InvalidNetwork​(java.lang.String msg)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidOutputs.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidOutputs.html new file mode 100644 index 000000000..e3c17c482 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidOutputs.html @@ -0,0 +1,317 @@ + + + + + +PaymentProtocolException.InvalidOutputs (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentProtocolException.InvalidOutputs

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InvalidOutputs

        +
        public InvalidOutputs​(java.lang.String msg)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentRequestURL.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentRequestURL.html new file mode 100644 index 000000000..94ac27260 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentRequestURL.html @@ -0,0 +1,330 @@ + + + + + +PaymentProtocolException.InvalidPaymentRequestURL (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentProtocolException.InvalidPaymentRequestURL

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InvalidPaymentRequestURL

        +
        public InvalidPaymentRequestURL​(java.lang.String msg)
        +
      • +
      + + + +
        +
      • +

        InvalidPaymentRequestURL

        +
        public InvalidPaymentRequestURL​(java.lang.Exception e)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentURL.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentURL.html new file mode 100644 index 000000000..56dbac624 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentURL.html @@ -0,0 +1,330 @@ + + + + + +PaymentProtocolException.InvalidPaymentURL (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentProtocolException.InvalidPaymentURL

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InvalidPaymentURL

        +
        public InvalidPaymentURL​(java.lang.Exception e)
        +
      • +
      + + + +
        +
      • +

        InvalidPaymentURL

        +
        public InvalidPaymentURL​(java.lang.String msg)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiData.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiData.html new file mode 100644 index 000000000..1a335a40e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiData.html @@ -0,0 +1,330 @@ + + + + + +PaymentProtocolException.InvalidPkiData (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentProtocolException.InvalidPkiData

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InvalidPkiData

        +
        public InvalidPkiData​(java.lang.String msg)
        +
      • +
      + + + +
        +
      • +

        InvalidPkiData

        +
        public InvalidPkiData​(java.lang.Exception e)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiType.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiType.html new file mode 100644 index 000000000..6cdf4a3e0 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiType.html @@ -0,0 +1,317 @@ + + + + + +PaymentProtocolException.InvalidPkiType (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentProtocolException.InvalidPkiType

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InvalidPkiType

        +
        public InvalidPkiType​(java.lang.String msg)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidVersion.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidVersion.html new file mode 100644 index 000000000..32dd05142 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidVersion.html @@ -0,0 +1,317 @@ + + + + + +PaymentProtocolException.InvalidVersion (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentProtocolException.InvalidVersion

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InvalidVersion

        +
        public InvalidVersion​(java.lang.String msg)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.PkiVerificationException.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.PkiVerificationException.html new file mode 100644 index 000000000..48e4485f4 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.PkiVerificationException.html @@ -0,0 +1,387 @@ + + + + + +PaymentProtocolException.PkiVerificationException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentProtocolException.PkiVerificationException

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        certificates

        +
        public java.util.List<java.security.cert.X509Certificate> certificates
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PkiVerificationException

        +
        public PkiVerificationException​(java.lang.String msg)
        +
      • +
      + + + +
        +
      • +

        PkiVerificationException

        +
        public PkiVerificationException​(java.lang.Exception e)
        +
      • +
      + + + +
        +
      • +

        PkiVerificationException

        +
        public PkiVerificationException​(java.lang.Exception e,
        +                                java.util.List<java.security.cert.X509Certificate> certificates)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.html new file mode 100644 index 000000000..a8998b07e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentProtocolException.html @@ -0,0 +1,371 @@ + + + + + +PaymentProtocolException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentProtocolException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.bitcoinj.protocols.payments.PaymentProtocolException
        • +
        +
      • +
      +
    • +
    +
  • +
+ +
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PaymentProtocolException

        +
        public PaymentProtocolException​(java.lang.String msg)
        +
      • +
      + + + +
        +
      • +

        PaymentProtocolException

        +
        public PaymentProtocolException​(java.lang.Exception e)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentSession.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentSession.html new file mode 100644 index 000000000..3be6bed53 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/PaymentSession.html @@ -0,0 +1,960 @@ + + + + + +PaymentSession (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaymentSession

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.protocols.payments.PaymentSession
    • +
    +
  • +
+
+
    +
  • +
    +
    public class PaymentSession
    +extends java.lang.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:
    +
    BIP 0070
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        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​(java.lang.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​(java.lang.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​(java.lang.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 java.util.List<PaymentProtocol.Output> getOutputs()
        +
        Returns the outputs of the payment request.
        +
      • +
      + + + +
        +
      • +

        getMemo

        +
        @Nullable
        +public java.lang.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 java.time.Instant time()
        +
        Returns the time that the payment request was generated.
        +
      • +
      + + + +
        +
      • +

        getDate

        +
        @Deprecated
        +public java.util.Date getDate()
        +
        Deprecated. +
        use time()
        +
        +
      • +
      + + + +
        +
      • +

        expires

        +
        public java.util.Optional<java.time.Instant> expires()
        +
        Returns the expires time of the payment request, or empty if none.
        +
      • +
      + + + +
        +
      • +

        getExpires

        +
        @Nullable
        +@Deprecated
        +public java.util.Date getExpires()
        +
        Deprecated. + +
        +
      • +
      + + + +
        +
      • +

        isExpired

        +
        public boolean isExpired()
        +
        This should always be called before attempting to call sendPayment.
        +
      • +
      + + + +
        +
      • +

        getPaymentUrl

        +
        @Nullable
        +public java.lang.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​(java.util.List<Transaction> txns,
        +                                                                    @Nullable
        +                                                                    Address refundAddr,
        +                                                                    @Nullable
        +                                                                    java.lang.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​(java.util.List<Transaction> txns,
        +                                                                @Nullable
        +                                                                Address refundAddr,
        +                                                                @Nullable
        +                                                                java.lang.String memo)
        +                                                         throws java.io.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:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        sendPayment

        +
        protected java.util.concurrent.CompletableFuture<PaymentProtocol.Ack> sendPayment​(java.net.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-alpha3/org/bitcoinj/protocols/payments/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/package-summary.html new file mode 100644 index 000000000..047600064 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/package-summary.html @@ -0,0 +1,248 @@ + + + + + +org.bitcoinj.protocols.payments (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

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-alpha3/org/bitcoinj/protocols/payments/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/package-tree.html new file mode 100644 index 000000000..386cbae98 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/protocols/payments/package-tree.html @@ -0,0 +1,186 @@ + + + + + +org.bitcoinj.protocols.payments Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.protocols.payments

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/script/Script.VerifyFlag.html b/javadoc/0.17-alpha3/org/bitcoinj/script/Script.VerifyFlag.html new file mode 100644 index 000000000..c036cea11 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/script/Script.VerifyFlag.html @@ -0,0 +1,499 @@ + + + + + +Script.VerifyFlag (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum Script.VerifyFlag

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static Script.VerifyFlag[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (Script.VerifyFlag c : Script.VerifyFlag.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static Script.VerifyFlag valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/script/Script.html b/javadoc/0.17-alpha3/org/bitcoinj/script/Script.html new file mode 100644 index 000000000..54af1048f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/script/Script.html @@ -0,0 +1,1259 @@ + + + + + +Script (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Script

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.script.Script
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Script
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        ALL_VERIFY_FLAGS

        +
        public static final java.util.EnumSet<Script.VerifyFlag> ALL_VERIFY_FLAGS
        +
      • +
      + + + +
        +
      • +

        MAX_SCRIPT_ELEMENT_SIZE

        +
        public static final int MAX_SCRIPT_ELEMENT_SIZE
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + + + + + +
        +
      • +

        MAX_P2SH_SIGOPS

        +
        public static final int MAX_P2SH_SIGOPS
        +
        Max number of sigops allowed in a standard p2sh redeem script
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        of

        +
        public static Script of​(java.util.List<ScriptChunk> chunks)
        +
        Wraps given script chunks.
        +
        +
        Parameters:
        +
        chunks - chunks to wrap
        +
        Returns:
        +
        script that wraps the chunks
        +
        +
      • +
      + + + +
        +
      • +

        of

        +
        public static Script of​(java.util.List<ScriptChunk> chunks,
        +                        java.time.Instant creationTime)
        +
        Wraps given script chunks.
        +
        +
        Parameters:
        +
        chunks - chunks to wrap
        +
        creationTime - creation time of the script
        +
        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,
        +                           java.time.Instant creationTime)
        +                    throws ScriptException
        +
        Construct a script that copies and wraps a given program, and a creation time. 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 of the script
        +
        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 java.util.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 java.util.List<ScriptChunk> getChunks()
        +
        Deprecated. + +
        +
      • +
      + + + +
        +
      • +

        creationTime

        +
        public java.util.Optional<java.time.Instant> creationTime()
        +
        Gets the creation time of this script, or empty if unknown.
        +
        +
        Returns:
        +
        creation time of this script, or empty if unknown
        +
        +
      • +
      + + + +
        +
      • +

        getCreationTimeSeconds

        +
        @Deprecated
        +public long getCreationTimeSeconds()
        +
        Deprecated. + +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        Returns the program opcodes as a string, for example "[1234] DUP HASH160", or "<empty>".
        +
        +
        Overrides:
        +
        toString in class java.lang.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,
        +                            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​(java.io.OutputStream os,
        +                              byte[] buf)
        +                       throws java.io.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:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        createMultiSigOutputScript

        +
        public static byte[] createMultiSigOutputScript​(int threshold,
        +                                                java.util.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 java.util.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
        +
      • +
      + + + + + + + +
        +
      • +

        correctlySpends

        +
        public void correctlySpends​(Transaction txContainingThis,
        +                            int scriptSigIndex,
        +                            @Nullable
        +                            TransactionWitness witness,
        +                            @Nullable
        +                            Coin value,
        +                            Script scriptPubKey,
        +                            java.util.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,
        +                            java.util.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​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptBuilder.html b/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptBuilder.html new file mode 100644 index 000000000..12de196fb --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptBuilder.html @@ -0,0 +1,1191 @@ + + + + + +ScriptBuilder (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ScriptBuilder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.script.ScriptBuilder
    • +
    +
  • +
+
+
    +
  • +
    +
    public class ScriptBuilder
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        creationTime

        +
        public ScriptBuilder creationTime​(java.time.Instant creationTime)
        +
        Sets the creation time to build the script with. If this is not set, the current time is used by the builder.
        +
        +
        Parameters:
        +
        creationTime - creation time to build 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:
        +
        number(long)
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        number(long)
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        number(long)
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        number(long)
        +
        +
      • +
      + + + +
        +
      • +

        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,
        +                                        java.time.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. The creation time will be the current time.
        +
        +
        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,
        +                                                java.util.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​(java.util.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​(java.util.List<byte[]> signatures)
        +
        Create a program that satisfies an OP_CHECKMULTISIG program, using pre-encoded signatures.
        +
      • +
      + + + +
        +
      • +

        createP2SHMultiSigInputScript

        +
        public static Script createP2SHMultiSigInputScript​(@Nullable
        +                                                   java.util.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​(java.util.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,
        +                                            java.util.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,
        +                                        java.util.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-alpha3/org/bitcoinj/script/ScriptChunk.html b/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptChunk.html new file mode 100644 index 000000000..5b3e07c41 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptChunk.html @@ -0,0 +1,541 @@ + + + + + +ScriptChunk (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ScriptChunk

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.script.ScriptChunk
    • +
    +
  • +
+
+
    +
  • +
    +
    public class ScriptChunk
    +extends java.lang.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 TypeFieldDescription
      byte[]data +
      For push operations, this is the vector to be pushed on the stack.
      +
      intopcode +
      Operation to be executed.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      ScriptChunk​(int opcode, + byte[] data) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      intdecodeOpN() +
      If this chunk is an OP_N opcode returns the equivalent integer value.
      +
      booleanequals​(java.lang.Object o) 
      booleanequalsOpCode​(int opcode) 
      inthashCode() 
      booleanisOpCode() +
      If this chunk is a single byte of non-pushdata content (could be OP_RESERVED or some invalid Opcode)
      +
      booleanisPushData() +
      Returns true if this chunk is pushdata content, including the single-byte pushdatas.
      +
      booleanisShortestPossiblePushData() +
      Called on a pushdata chunk, returns true if it uses the smallest possible way (according to BIP62) to push the data.
      +
      intsize() 
      byte[]toByteArray() 
      java.lang.StringtoString() 
      voidwrite​(java.io.OutputStream stream) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        ScriptChunk

        +
        public ScriptChunk​(int opcode,
        +                   @Nullable
        +                   byte[] data)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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

        +
        public void write​(java.io.OutputStream stream)
        +           throws java.io.IOException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        toByteArray

        +
        public byte[] toByteArray()
        +
      • +
      + + + +
        +
      • +

        size

        +
        public int size()
        +
      • +
      + + + +
        +
      • +

        toString

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

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptError.html b/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptError.html new file mode 100644 index 000000000..47ed8f48b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptError.html @@ -0,0 +1,924 @@ + + + + + +ScriptError (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum ScriptError

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<ScriptError>
    • +
    • +
        +
      • org.bitcoinj.script.ScriptError
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<ScriptError>
    +
    +
    +
    public enum ScriptError
    +extends java.lang.Enum<ScriptError>
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        values

        +
        public static ScriptError[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (ScriptError c : ScriptError.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static ScriptError valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        getMnemonic

        +
        public java.lang.String getMnemonic()
        +
      • +
      + + + +
        +
      • +

        fromMnemonic

        +
        public static ScriptError fromMnemonic​(java.lang.String name)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptException.html b/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptException.html new file mode 100644 index 000000000..777dba48e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptException.html @@ -0,0 +1,375 @@ + + + + + +ScriptException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ScriptException

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ScriptException

        +
        public ScriptException​(ScriptError err,
        +                       java.lang.String msg)
        +
      • +
      + + + +
        +
      • +

        ScriptException

        +
        public ScriptException​(ScriptError err,
        +                       java.lang.String msg,
        +                       java.lang.Exception e)
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptOpCodes.html b/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptOpCodes.html new file mode 100644 index 000000000..4c46aae01 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptOpCodes.html @@ -0,0 +1,2472 @@ + + + + + +ScriptOpCodes (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ScriptOpCodes

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.script.ScriptOpCodes
    • +
    +
  • +
+
+
    +
  • +
    +
    public class ScriptOpCodes
    +extends java.lang.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.
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptPattern.html b/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptPattern.html new file mode 100644 index 000000000..e138c2f04 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/script/ScriptPattern.html @@ -0,0 +1,592 @@ + + + + + +ScriptPattern (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ScriptPattern

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.script.ScriptPattern
    • +
    +
  • +
+
+
    +
  • +
    +
    public class ScriptPattern
    +extends java.lang.Object
    +
    This is a Script pattern matcher with some typical script patterns
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      ScriptPattern() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static byte[]extractHashFromP2PKH​(Script script) +
      Extract the pubkey hash from a P2PKH scriptPubKey.
      +
      static byte[]extractHashFromP2SH​(Script script) +
      Extract the script hash from a P2SH scriptPubKey.
      +
      static byte[]extractHashFromP2WH​(Script script) +
      Extract the pubkey hash from a P2WPKH or the script hash from a P2WSH scriptPubKey.
      +
      static byte[]extractKeyFromP2PK​(Script script) +
      Extract the pubkey from a P2SH scriptPubKey.
      +
      static byte[]extractOutputKeyFromP2TR​(Script script) +
      Extract the taproot output key from a P2TR scriptPubKey.
      +
      static Sha256HashextractWitnessCommitmentHash​(Script script) +
      Retrieves the hash from a segwit commitment (in an output of the coinbase transaction).
      +
      static booleanisOpReturn​(Script script) +
      Returns whether this script is using OP_RETURN to store arbitrary data.
      +
      static booleanisP2PK​(Script script) +
      Returns true if this script is of the form <pubkey> OP_CHECKSIG.
      +
      static booleanisP2PKH​(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 booleanisP2SH​(Script script) +
      + Whether or not this is a scriptPubKey representing a P2SH output.
      +
      static booleanisP2TR​(Script script) +
      Returns true if this script is of the form OP_1 <pubkey>.
      +
      static booleanisP2WH​(Script script) +
      Returns true if this script is of the form OP_0 <hash>.
      +
      static booleanisP2WPKH​(Script script) +
      Returns true if this script is of the form OP_0 <hash> and hash is 20 bytes long.
      +
      static booleanisP2WSH​(Script script) +
      Returns true if this script is of the form OP_0 <hash> and hash is 32 bytes long.
      +
      static booleanisSentToMultisig​(Script script) +
      Returns whether this script matches the format used for m-of-n multisig outputs: + [m] [keys...] [n] CHECKMULTISIG
      +
      static booleanisWitnessCommitment​(Script script) +
      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 Detail

      + + + +
        +
      • +

        ScriptPattern

        +
        public ScriptPattern()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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).
        +
      • +
      + + + +
        +
      • +

        extractWitnessCommitmentHash

        +
        public static Sha256Hash extractWitnessCommitmentHash​(Script script)
        +
        Retrieves the hash from a segwit commitment (in an output of the coinbase transaction).
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/script/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/script/package-summary.html new file mode 100644 index 000000000..59d6d9dbc --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/script/package-summary.html @@ -0,0 +1,231 @@ + + + + + +org.bitcoinj.script (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

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-alpha3/org/bitcoinj/script/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/script/package-tree.html new file mode 100644 index 000000000..4a9dbf925 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/script/package-tree.html @@ -0,0 +1,197 @@ + + + + + +org.bitcoinj.script Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.script

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Enum Hierarchy

+
    +
  • java.lang.Object +
      +
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) + +
    • +
    +
  • +
+
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/signers/CustomTransactionSigner.SignatureAndKey.html b/javadoc/0.17-alpha3/org/bitcoinj/signers/CustomTransactionSigner.SignatureAndKey.html new file mode 100644 index 000000000..8cfabec16 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/signers/CustomTransactionSigner.SignatureAndKey.html @@ -0,0 +1,328 @@ + + + + + +CustomTransactionSigner.SignatureAndKey (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CustomTransactionSigner.SignatureAndKey

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.signers.CustomTransactionSigner.SignatureAndKey
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    CustomTransactionSigner
    +
    +
    +
    public static class CustomTransactionSigner.SignatureAndKey
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+ +
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/signers/CustomTransactionSigner.html b/javadoc/0.17-alpha3/org/bitcoinj/signers/CustomTransactionSigner.html new file mode 100644 index 000000000..bc88f86aa --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/signers/CustomTransactionSigner.html @@ -0,0 +1,396 @@ + + + + + +CustomTransactionSigner (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CustomTransactionSigner

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.signers.CustomTransactionSigner
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    TransactionSigner
    +
    +
    +
    public abstract class CustomTransactionSigner
    +extends java.lang.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-alpha3/org/bitcoinj/signers/LocalTransactionSigner.html b/javadoc/0.17-alpha3/org/bitcoinj/signers/LocalTransactionSigner.html new file mode 100644 index 000000000..62d4b7ac8 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/signers/LocalTransactionSigner.html @@ -0,0 +1,370 @@ + + + + + +LocalTransactionSigner (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class LocalTransactionSigner

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.signers.LocalTransactionSigner
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    TransactionSigner
    +
    +
    +
    public class LocalTransactionSigner
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        LocalTransactionSigner

        +
        public LocalTransactionSigner()
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/signers/MissingSigResolutionSigner.html b/javadoc/0.17-alpha3/org/bitcoinj/signers/MissingSigResolutionSigner.html new file mode 100644 index 000000000..88e79f9f9 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/signers/MissingSigResolutionSigner.html @@ -0,0 +1,378 @@ + + + + + +MissingSigResolutionSigner (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MissingSigResolutionSigner

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.signers.MissingSigResolutionSigner
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    TransactionSigner
    +
    +
    +
    public class MissingSigResolutionSigner
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        MissingSigResolutionSigner

        +
        public MissingSigResolutionSigner()
        +
      • +
      + + + +
        +
      • +

        MissingSigResolutionSigner

        +
        public MissingSigResolutionSigner​(Wallet.MissingSigsMode missingSigsMode)
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/signers/TransactionSigner.MissingSignatureException.html b/javadoc/0.17-alpha3/org/bitcoinj/signers/TransactionSigner.MissingSignatureException.html new file mode 100644 index 000000000..ac24461ed --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/signers/TransactionSigner.MissingSignatureException.html @@ -0,0 +1,300 @@ + + + + + +TransactionSigner.MissingSignatureException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class TransactionSigner.MissingSignatureException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • java.lang.RuntimeException
        • +
        • +
            +
          • org.bitcoinj.signers.TransactionSigner.MissingSignatureException
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    Enclosing interface:
    +
    TransactionSigner
    +
    +
    +
    public static class TransactionSigner.MissingSignatureException
    +extends java.lang.RuntimeException
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        MissingSignatureException

        +
        public MissingSignatureException()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/signers/TransactionSigner.ProposedTransaction.html b/javadoc/0.17-alpha3/org/bitcoinj/signers/TransactionSigner.ProposedTransaction.html new file mode 100644 index 000000000..91a5fd33f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/signers/TransactionSigner.ProposedTransaction.html @@ -0,0 +1,335 @@ + + + + + +TransactionSigner.ProposedTransaction (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class TransactionSigner.ProposedTransaction

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.signers.TransactionSigner.ProposedTransaction
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing interface:
    +
    TransactionSigner
    +
    +
    +
    public static class TransactionSigner.ProposedTransaction
    +extends java.lang.Object
    +
    This class wraps transaction proposed to complete keeping a metadata that may be updated, used and effectively + shared by transaction signers.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      java.util.Map<Script,​java.util.List<ChildNumber>>keyPaths +
      HD key paths used for each input to derive a signing key.
      +
      TransactionpartialTx 
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + + + + + +
        +
      • +

        keyPaths

        +
        public final java.util.Map<Script,​java.util.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 Detail

      + + + +
        +
      • +

        ProposedTransaction

        +
        public ProposedTransaction​(Transaction partialTx)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/signers/TransactionSigner.html b/javadoc/0.17-alpha3/org/bitcoinj/signers/TransactionSigner.html new file mode 100644 index 000000000..0bfea65a6 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/signers/TransactionSigner.html @@ -0,0 +1,313 @@ + + + + + +TransactionSigner (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/signers/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/signers/package-summary.html new file mode 100644 index 000000000..3e9b40ed5 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/signers/package-summary.html @@ -0,0 +1,228 @@ + + + + + +org.bitcoinj.signers (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

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-alpha3/org/bitcoinj/signers/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/signers/package-tree.html new file mode 100644 index 000000000..728c1d955 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/signers/package-tree.html @@ -0,0 +1,184 @@ + + + + + +org.bitcoinj.signers Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.signers

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/store/BlockStore.html b/javadoc/0.17-alpha3/org/bitcoinj/store/BlockStore.html new file mode 100644 index 000000000..7772dcc29 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/store/BlockStore.html @@ -0,0 +1,366 @@ + + + + + +BlockStore (bitcoinj-core 0.17-SNAPSHOT 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.

    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/store/BlockStoreException.html b/javadoc/0.17-alpha3/org/bitcoinj/store/BlockStoreException.html new file mode 100644 index 000000000..7b07b36c4 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/store/BlockStoreException.html @@ -0,0 +1,324 @@ + + + + + +BlockStoreException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BlockStoreException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.bitcoinj.store.BlockStoreException
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    Direct Known Subclasses:
    +
    ChainFileLockedException
    +
    +
    +
    public class BlockStoreException
    +extends java.lang.Exception
    +
    Thrown when something goes wrong with storing a block. Examples: out of disk space.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        BlockStoreException

        +
        public BlockStoreException​(java.lang.String message)
        +
      • +
      + + + +
        +
      • +

        BlockStoreException

        +
        public BlockStoreException​(java.lang.Throwable t)
        +
      • +
      + + + +
        +
      • +

        BlockStoreException

        +
        public BlockStoreException​(java.lang.String message,
        +                           java.lang.Throwable t)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/store/ChainFileLockedException.html b/javadoc/0.17-alpha3/org/bitcoinj/store/ChainFileLockedException.html new file mode 100644 index 000000000..f21e6c1b5 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/store/ChainFileLockedException.html @@ -0,0 +1,310 @@ + + + + + +ChainFileLockedException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ChainFileLockedException

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class ChainFileLockedException
    +extends BlockStoreException
    +
    Thrown by SPVBlockStore when the process cannot gain exclusive access to the chain file.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        ChainFileLockedException

        +
        public ChainFileLockedException​(java.lang.String message)
        +
      • +
      + + + +
        +
      • +

        ChainFileLockedException

        +
        public ChainFileLockedException​(java.lang.Throwable t)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/store/FullPrunedBlockStore.html b/javadoc/0.17-alpha3/org/bitcoinj/store/FullPrunedBlockStore.html new file mode 100644 index 000000000..dbfd3ac7f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/store/FullPrunedBlockStore.html @@ -0,0 +1,577 @@ + + + + + +FullPrunedBlockStore (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + + +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/store/MemoryBlockStore.html b/javadoc/0.17-alpha3/org/bitcoinj/store/MemoryBlockStore.html new file mode 100644 index 000000000..63360bcb0 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/store/MemoryBlockStore.html @@ -0,0 +1,424 @@ + + + + + +MemoryBlockStore (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MemoryBlockStore

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.store.MemoryBlockStore
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    BlockStore
    +
    +
    +
    public class MemoryBlockStore
    +extends java.lang.Object
    +implements BlockStore
    +
    Keeps StoredBlocks in memory. Used primarily for unit testing.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      MemoryBlockStore​(Block genesisBlock) 
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+ +
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/store/MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag.html b/javadoc/0.17-alpha3/org/bitcoinj/store/MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag.html new file mode 100644 index 000000000..da273d7c9 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/store/MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag.html @@ -0,0 +1,328 @@ + + + + + +MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.store.MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    MemoryFullPrunedBlockStore
    +
    +
    +
    protected static class MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + + + + + +
        +
      • +

        wasUndoable

        +
        public boolean wasUndoable
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        StoredBlockAndWasUndoableFlag

        +
        public StoredBlockAndWasUndoableFlag​(StoredBlock block,
        +                                     boolean wasUndoable)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/store/MemoryFullPrunedBlockStore.html b/javadoc/0.17-alpha3/org/bitcoinj/store/MemoryFullPrunedBlockStore.html new file mode 100644 index 000000000..a7512a76c --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/store/MemoryFullPrunedBlockStore.html @@ -0,0 +1,870 @@ + + + + + +MemoryFullPrunedBlockStore (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MemoryFullPrunedBlockStore

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.store.MemoryFullPrunedBlockStore
    • +
    +
  • +
+
+ +
+
+ +
+
+ +
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/store/SPVBlockStore.html b/javadoc/0.17-alpha3/org/bitcoinj/store/SPVBlockStore.html new file mode 100644 index 000000000..f9777e39e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/store/SPVBlockStore.html @@ -0,0 +1,726 @@ + + + + + +SPVBlockStore (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class SPVBlockStore

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.store.SPVBlockStore
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    BlockStore
    +
    +
    +
    public class SPVBlockStore
    +extends java.lang.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.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        lock

        +
        protected final java.util.concurrent.locks.ReentrantLock lock
        +
      • +
      + + + +
        +
      • +

        DEFAULT_CAPACITY

        +
        public static final int DEFAULT_CAPACITY
        +
        The default number of headers that will be stored in the ring buffer.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        HEADER_MAGIC

        +
        public static final java.lang.String HEADER_MAGIC
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        buffer

        +
        protected volatile java.nio.MappedByteBuffer buffer
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        notFoundCache

        +
        protected java.util.LinkedHashMap<Sha256Hash,​java.lang.Object> notFoundCache
        +
      • +
      + + + +
        +
      • +

        fileLock

        +
        protected java.nio.channels.FileLock fileLock
        +
      • +
      + + + +
        +
      • +

        randomAccessFile

        +
        protected java.io.RandomAccessFile randomAccessFile
        +
      • +
      + + + +
        +
      • +

        lastChainHead

        +
        protected StoredBlock lastChainHead
        +
      • +
      + + + + + + + +
        +
      • +

        FILE_PROLOGUE_BYTES

        +
        protected static final int FILE_PROLOGUE_BYTES
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SPVBlockStore

        +
        public SPVBlockStore​(NetworkParameters params,
        +                     java.io.File file)
        +              throws BlockStoreException
        +
        Creates and initializes an SPV block store that can hold DEFAULT_CAPACITY block headers. Will create the + given file if it's missing. This operation will block on disk.
        +
        +
        Parameters:
        +
        file - file to use for the block store
        +
        Throws:
        +
        BlockStoreException - if something goes wrong
        +
        +
      • +
      + + + +
        +
      • +

        SPVBlockStore

        +
        public SPVBlockStore​(NetworkParameters params,
        +                     java.io.File file,
        +                     int capacity,
        +                     boolean grow)
        +              throws BlockStoreException
        +
        Creates and initializes an SPV block store that can hold a given amount of blocks. Will create the given file if + it's missing. This operation will block on disk.
        +
        +
        Parameters:
        +
        file - file to use for the block store
        +
        capacity - custom capacity in number of block headers
        +
        grow - whether or not to migrate an existing block store of different capacity
        +
        Throws:
        +
        BlockStoreException - if something goes wrong
        +
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/store/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/store/package-summary.html new file mode 100644 index 000000000..ce0951c7f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/store/package-summary.html @@ -0,0 +1,235 @@ + + + + + +org.bitcoinj.store (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

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-alpha3/org/bitcoinj/store/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/store/package-tree.html new file mode 100644 index 000000000..e8c99e94b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/store/package-tree.html @@ -0,0 +1,192 @@ + + + + + +org.bitcoinj.store Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.store

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/testing/FakeTxBuilder.BlockPair.html b/javadoc/0.17-alpha3/org/bitcoinj/testing/FakeTxBuilder.BlockPair.html new file mode 100644 index 000000000..00cc80b69 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/testing/FakeTxBuilder.BlockPair.html @@ -0,0 +1,328 @@ + + + + + +FakeTxBuilder.BlockPair (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FakeTxBuilder.BlockPair

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.testing.FakeTxBuilder.BlockPair
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    FakeTxBuilder
    +
    +
    +
    public static class FakeTxBuilder.BlockPair
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      BlockPair​(Block block, + StoredBlock storedBlock) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/testing/FakeTxBuilder.DoubleSpends.html b/javadoc/0.17-alpha3/org/bitcoinj/testing/FakeTxBuilder.DoubleSpends.html new file mode 100644 index 000000000..438f0fbaa --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/testing/FakeTxBuilder.DoubleSpends.html @@ -0,0 +1,340 @@ + + + + + +FakeTxBuilder.DoubleSpends (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FakeTxBuilder.DoubleSpends

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.testing.FakeTxBuilder.DoubleSpends
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    FakeTxBuilder
    +
    +
    +
    public static class FakeTxBuilder.DoubleSpends
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      DoubleSpends() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+ +
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/testing/FakeTxBuilder.html b/javadoc/0.17-alpha3/org/bitcoinj/testing/FakeTxBuilder.html new file mode 100644 index 000000000..36f4bcef1 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/testing/FakeTxBuilder.html @@ -0,0 +1,854 @@ + + + + + +FakeTxBuilder (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FakeTxBuilder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.testing.FakeTxBuilder
    • +
    +
  • +
+
+
    +
  • +
    +
    public class FakeTxBuilder
    +extends java.lang.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-alpha3/org/bitcoinj/testing/MockAltNetwork.html b/javadoc/0.17-alpha3/org/bitcoinj/testing/MockAltNetwork.html new file mode 100644 index 000000000..9e2b1f433 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/testing/MockAltNetwork.html @@ -0,0 +1,495 @@ + + + + + +MockAltNetwork (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MockAltNetwork

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.testing.MockAltNetwork
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Network
    +
    +
    +
    public class MockAltNetwork
    +extends java.lang.Object
    +implements Network
    +
    Mock Alt-net implementation of Network for unit tests.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      MockAltNetwork() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanexceedsMaxMoney​(Monetary monetary) +
      Check if an amount exceeds the maximum allowed for a network (if the network has one)
      +
      booleanhasMaxMoney() +
      Does this network have a fixed maximum number of coins
      +
      java.lang.Stringid() +
      The dot-seperated string id for this network.
      +
      intlegacyAddressHeader() +
      Header byte of base58 encoded legacy P2PKH addresses for this network.
      +
      intlegacyP2SHHeader() +
      Header byte of base58 encoded legacy P2SH addresses for this network.
      +
      MonetarymaxMoney() +
      Maximum number of coins for this network as a Monetary value.
      +
      java.lang.StringsegwitAddressHrp() +
      Human-readable part (HRP) of bech32 encoded segwit addresses for this network.
      +
      java.lang.StringuriScheme() +
      The URI scheme for this network.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        MockAltNetwork

        +
        public MockAltNetwork()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        id

        +
        public java.lang.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:
        +
        LegacyAddress.AddressHeader
        +
        +
      • +
      + + + +
        +
      • +

        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:
        +
        LegacyAddress.P2SHHeader
        +
        +
      • +
      + + + +
        +
      • +

        segwitAddressHrp

        +
        public java.lang.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 java.lang.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-alpha3/org/bitcoinj/testing/MockAltNetworkParams.html b/javadoc/0.17-alpha3/org/bitcoinj/testing/MockAltNetworkParams.html new file mode 100644 index 000000000..c67cd7d07 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/testing/MockAltNetworkParams.html @@ -0,0 +1,569 @@ + + + + + +MockAltNetworkParams (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MockAltNetworkParams

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        MOCKNET_GOOD_ADDRESS

        +
        public static final java.lang.String MOCKNET_GOOD_ADDRESS
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MockAltNetworkParams

        +
        public MockAltNetworkParams()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getPaymentProtocolId

        +
        public java.lang.String getPaymentProtocolId()
        +
        +
        Specified by:
        +
        getPaymentProtocolId in class NetworkParameters
        +
        Returns:
        +
        the payment protocol network id string
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getUriScheme

        +
        public java.lang.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
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/testing/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/testing/package-summary.html new file mode 100644 index 000000000..adbee844e --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/testing/package-summary.html @@ -0,0 +1,186 @@ + + + + + +org.bitcoinj.testing (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.testing

+
+
+ +
+
+
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/testing/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/testing/package-tree.html new file mode 100644 index 000000000..e6fd71823 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/testing/package-tree.html @@ -0,0 +1,169 @@ + + + + + +org.bitcoinj.testing Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.testing

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/uri/BitcoinURI.html b/javadoc/0.17-alpha3/org/bitcoinj/uri/BitcoinURI.html new file mode 100644 index 000000000..3b47c0ae0 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/uri/BitcoinURI.html @@ -0,0 +1,809 @@ + + + + + +BitcoinURI (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BitcoinURI

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.uri.BitcoinURI
    • +
    +
  • +
+
+
    +
  • +
    +
    public class BitcoinURI
    +extends java.lang.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:
    +
    BIP 0021
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BitcoinURI

        +
        @Deprecated
        +public BitcoinURI​(@Nullable
        +                  NetworkParameters params,
        +                  java.lang.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 Detail

      + + + +
        +
      • +

        of

        +
        public static BitcoinURI of​(java.lang.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​(java.lang.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 java.lang.String getLabel()
        +
        +
        Returns:
        +
        The label from the URI.
        +
        +
      • +
      + + + +
        +
      • +

        getMessage

        +
        public java.lang.String getMessage()
        +
        +
        Returns:
        +
        The message from the URI.
        +
        +
      • +
      + + + +
        +
      • +

        getPaymentRequestUrl

        +
        public final java.lang.String getPaymentRequestUrl()
        +
        +
        Returns:
        +
        The URL where a payment request (as specified in BIP 70) may + be fetched.
        +
        +
      • +
      + + + +
        +
      • +

        getPaymentRequestUrls

        +
        public java.util.List<java.lang.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 java.lang.Object getParameterByName​(java.lang.String name)
        +
        +
        Parameters:
        +
        name - The name of the parameter
        +
        Returns:
        +
        The parameter value, or null if not present
        +
        +
      • +
      + + + +
        +
      • +

        toString

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

        convertToBitcoinURI

        +
        public static java.lang.String convertToBitcoinURI​(Address address,
        +                                                   Coin amount,
        +                                                   java.lang.String label,
        +                                                   java.lang.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 java.lang.String convertToBitcoinURI​(NetworkParameters params,
        +                                                   java.lang.String address,
        +                                                   @Nullable
        +                                                   Coin amount,
        +                                                   @Nullable
        +                                                   java.lang.String label,
        +                                                   @Nullable
        +                                                   java.lang.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 java.lang.String convertToBitcoinURI​(Network network,
        +                                                   java.lang.String address,
        +                                                   @Nullable
        +                                                   Coin amount,
        +                                                   @Nullable
        +                                                   java.lang.String label,
        +                                                   @Nullable
        +                                                   java.lang.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-alpha3/org/bitcoinj/uri/BitcoinURIParseException.html b/javadoc/0.17-alpha3/org/bitcoinj/uri/BitcoinURIParseException.html new file mode 100644 index 000000000..5f488af63 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/uri/BitcoinURIParseException.html @@ -0,0 +1,317 @@ + + + + + +BitcoinURIParseException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BitcoinURIParseException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.bitcoinj.uri.BitcoinURIParseException
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    Direct Known Subclasses:
    +
    OptionalFieldValidationException, RequiredFieldValidationException
    +
    +
    +
    public class BitcoinURIParseException
    +extends java.lang.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        BitcoinURIParseException

        +
        public BitcoinURIParseException​(java.lang.String s)
        +
      • +
      + + + +
        +
      • +

        BitcoinURIParseException

        +
        public BitcoinURIParseException​(java.lang.String s,
        +                                java.lang.Throwable throwable)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/uri/OptionalFieldValidationException.html b/javadoc/0.17-alpha3/org/bitcoinj/uri/OptionalFieldValidationException.html new file mode 100644 index 000000000..74688bdeb --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/uri/OptionalFieldValidationException.html @@ -0,0 +1,320 @@ + + + + + +OptionalFieldValidationException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class OptionalFieldValidationException

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        OptionalFieldValidationException

        +
        public OptionalFieldValidationException​(java.lang.String s)
        +
      • +
      + + + +
        +
      • +

        OptionalFieldValidationException

        +
        public OptionalFieldValidationException​(java.lang.String s,
        +                                        java.lang.Throwable throwable)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/uri/RequiredFieldValidationException.html b/javadoc/0.17-alpha3/org/bitcoinj/uri/RequiredFieldValidationException.html new file mode 100644 index 000000000..9aa5c3c59 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/uri/RequiredFieldValidationException.html @@ -0,0 +1,321 @@ + + + + + +RequiredFieldValidationException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class RequiredFieldValidationException

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        RequiredFieldValidationException

        +
        public RequiredFieldValidationException​(java.lang.String s)
        +
      • +
      + + + +
        +
      • +

        RequiredFieldValidationException

        +
        public RequiredFieldValidationException​(java.lang.String s,
        +                                        java.lang.Throwable throwable)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/uri/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/uri/package-summary.html new file mode 100644 index 000000000..01c29f2e9 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/uri/package-summary.html @@ -0,0 +1,200 @@ + + + + + +org.bitcoinj.uri (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

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-alpha3/org/bitcoinj/uri/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/uri/package-tree.html new file mode 100644 index 000000000..4f5ab70a3 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/uri/package-tree.html @@ -0,0 +1,175 @@ + + + + + +org.bitcoinj.uri Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.uri

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/AppDataDirectory.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/AppDataDirectory.html new file mode 100644 index 000000000..8a756b049 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/AppDataDirectory.html @@ -0,0 +1,347 @@ + + + + + +AppDataDirectory (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class AppDataDirectory

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.utils.AppDataDirectory
    • +
    +
  • +
+
+
    +
  • +
    +
    public class AppDataDirectory
    +extends java.lang.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 
      ConstructorDescription
      AppDataDirectory() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static java.nio.file.Pathget​(java.lang.String appName) +
      Get and create if necessary the Path to the application data directory.
      +
      static java.nio.file.PathgetPath​(java.lang.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 Detail

      + + + +
        +
      • +

        AppDataDirectory

        +
        public AppDataDirectory()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        get

        +
        public static java.nio.file.Path get​(java.lang.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 java.nio.file.Path getPath​(java.lang.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-alpha3/org/bitcoinj/utils/BaseTaggableObject.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/BaseTaggableObject.html new file mode 100644 index 000000000..a198cac52 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/BaseTaggableObject.html @@ -0,0 +1,453 @@ + + + + + +BaseTaggableObject (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BaseTaggableObject

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.utils.BaseTaggableObject
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    TaggableObject
    +
    +
    +
    Direct Known Subclasses:
    +
    Wallet
    +
    +
    +
    @Deprecated
    +public class BaseTaggableObject
    +extends java.lang.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 TypeFieldDescription
      protected java.util.Map<java.lang.String,​com.google.protobuf.ByteString>tags +
      Deprecated.
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      BaseTaggableObject() +
      Deprecated.
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      com.google.protobuf.ByteStringgetTag​(java.lang.String tag) +
      Deprecated.
      +
      java.util.Map<java.lang.String,​com.google.protobuf.ByteString>getTags() +
      Deprecated.
      +
      com.google.protobuf.ByteStringmaybeGetTag​(java.lang.String tag) +
      Deprecated.
      +
      voidsetTag​(java.lang.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 Detail

      + + + +
        +
      • +

        tags

        +
        protected final java.util.Map<java.lang.String,​com.google.protobuf.ByteString> tags
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BaseTaggableObject

        +
        public BaseTaggableObject()
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        maybeGetTag

        +
        @Nullable
        +@Deprecated
        +public com.google.protobuf.ByteString maybeGetTag​(java.lang.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​(java.lang.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​(java.lang.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 java.util.Map<java.lang.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-alpha3/org/bitcoinj/utils/BlockFileLoader.BlockFileIterator.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/BlockFileLoader.BlockFileIterator.html new file mode 100644 index 000000000..68b9cf10d --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/BlockFileLoader.BlockFileIterator.html @@ -0,0 +1,372 @@ + + + + + +BlockFileLoader.BlockFileIterator (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BlockFileLoader.BlockFileIterator

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.utils.BlockFileLoader.BlockFileIterator
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.util.Iterator<java.nio.ByteBuffer>
    +
    +
    +
    Enclosing class:
    +
    BlockFileLoader
    +
    +
    +
    public class BlockFileLoader.BlockFileIterator
    +extends java.lang.Object
    +implements java.util.Iterator<java.nio.ByteBuffer>
    +
    Iterates all the blocks in a single block file.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      BlockFileIterator​(java.io.File blockFile) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanhasNext() 
      java.nio.ByteBuffernext() 
      voidremove() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

        Methods inherited from interface java.util.Iterator

        +forEachRemaining
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BlockFileIterator

        +
        public BlockFileIterator​(java.io.File blockFile)
        +                  throws java.io.FileNotFoundException
        +
        +
        Throws:
        +
        java.io.FileNotFoundException
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        hasNext

        +
        public boolean hasNext()
        +
        +
        Specified by:
        +
        hasNext in interface java.util.Iterator<java.nio.ByteBuffer>
        +
        +
      • +
      + + + +
        +
      • +

        next

        +
        public java.nio.ByteBuffer next()
        +                         throws java.util.NoSuchElementException
        +
        +
        Specified by:
        +
        next in interface java.util.Iterator<java.nio.ByteBuffer>
        +
        Throws:
        +
        java.util.NoSuchElementException
        +
        +
      • +
      + + + +
        +
      • +

        remove

        +
        public void remove()
        +            throws java.lang.UnsupportedOperationException
        +
        +
        Specified by:
        +
        remove in interface java.util.Iterator<java.nio.ByteBuffer>
        +
        Throws:
        +
        java.lang.UnsupportedOperationException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/BlockFileLoader.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/BlockFileLoader.html new file mode 100644 index 000000000..fa75b0cce --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/BlockFileLoader.html @@ -0,0 +1,516 @@ + + + + + +BlockFileLoader (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BlockFileLoader

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.utils.BlockFileLoader
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.lang.Iterable<Block>
    +
    +
    +
    public class BlockFileLoader
    +extends java.lang.Object
    +implements java.lang.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 Detail

      + + + +
        +
      • +

        BlockFileLoader

        +
        public BlockFileLoader​(Network network,
        +                       java.io.File blocksDir)
        +
      • +
      + + + +
        +
      • +

        BlockFileLoader

        +
        public BlockFileLoader​(Network network,
        +                       java.util.List<java.io.File> files)
        +
      • +
      + + + +
        +
      • +

        BlockFileLoader

        +
        @Deprecated
        +public BlockFileLoader​(NetworkParameters params,
        +                       java.io.File blocksDir)
        +
        Deprecated.
        +
      • +
      + + + +
        +
      • +

        BlockFileLoader

        +
        @Deprecated
        +public BlockFileLoader​(NetworkParameters params,
        +                       java.util.List<java.io.File> files)
        +
        Deprecated.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getReferenceClientBlockFileList

        +
        public static java.util.List<java.io.File> getReferenceClientBlockFileList​(java.io.File blocksDir)
        +
        Gets the list of files which contain blocks from Bitcoin Core.
        +
      • +
      + + + +
        +
      • +

        getReferenceClientBlockFileList

        +
        public static java.util.List<java.io.File> getReferenceClientBlockFileList()
        +
      • +
      + + + +
        +
      • +

        defaultBlocksDir

        +
        public static java.io.File defaultBlocksDir()
        +
      • +
      + + + +
        +
      • +

        iterator

        +
        public java.util.Iterator<Block> iterator()
        +
        +
        Specified by:
        +
        iterator in interface java.lang.Iterable<Block>
        +
        +
      • +
      + + + +
        +
      • +

        stream

        +
        public java.util.stream.Stream<Block> stream()
        +
      • +
      + + + +
        +
      • +

        streamBuffers

        +
        public java.util.stream.Stream<java.nio.ByteBuffer> streamBuffers()
        +
      • +
      + + + +
        +
      • +

        fileBlockStream

        +
        protected java.util.stream.Stream<java.nio.ByteBuffer> fileBlockStream​(java.io.File file)
        +
      • +
      + + + +
        +
      • +

        fileBlockSpliterator

        +
        protected java.util.Spliterator<java.nio.ByteBuffer> fileBlockSpliterator​(java.io.File file)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/BriefLogFormatter.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/BriefLogFormatter.html new file mode 100644 index 000000000..136af68ad --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/BriefLogFormatter.html @@ -0,0 +1,380 @@ + + + + + +BriefLogFormatter (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BriefLogFormatter

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.util.logging.Formatter
    • +
    • +
        +
      • org.bitcoinj.utils.BriefLogFormatter
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    public class BriefLogFormatter
    +extends java.util.logging.Formatter
    +
    A Java logging formatter that writes more compact output than the default.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      BriefLogFormatter() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.Stringformat​(java.util.logging.LogRecord logRecord) 
      static voidinit() 
      static voidinit​(java.util.logging.Level level) +
      Configures JDK logging to use this class for everything.
      +
      static voidinitVerbose() 
      static voidinitWithSilentBitcoinJ() 
      +
        +
      • + + +

        Methods inherited from class java.util.logging.Formatter

        +formatMessage, getHead, getTail
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        BriefLogFormatter

        +
        public BriefLogFormatter()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        init

        +
        public static void init()
        +
      • +
      + + + +
        +
      • +

        init

        +
        public static void init​(java.util.logging.Level level)
        +
        Configures JDK logging to use this class for everything.
        +
      • +
      + + + +
        +
      • +

        initVerbose

        +
        public static void initVerbose()
        +
      • +
      + + + +
        +
      • +

        initWithSilentBitcoinJ

        +
        public static void initWithSilentBitcoinJ()
        +
      • +
      + + + +
        +
      • +

        format

        +
        public java.lang.String format​(java.util.logging.LogRecord logRecord)
        +
        +
        Specified by:
        +
        format in class java.util.logging.Formatter
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/BtcAutoFormat.Style.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/BtcAutoFormat.Style.html new file mode 100644 index 000000000..8a1b2e1f2 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/BtcAutoFormat.Style.html @@ -0,0 +1,388 @@ + + + + + +BtcAutoFormat.Style (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum BtcAutoFormat.Style

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<BtcAutoFormat.Style>
    +
    +
    +
    Enclosing class:
    +
    BtcAutoFormat
    +
    +
    +
    public static enum BtcAutoFormat.Style
    +extends java.lang.Enum<BtcAutoFormat.Style>
    +
    Enum for specifying the style of currency indicators that are used + when formatting, either codes or symbols.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      CODE +
      Constant for the formatting style that uses a currency code, e.g., "BTC".
      +
      SYMBOL +
      Constant for the formatting style that uses a currency symbol, e.g., "฿".
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static BtcAutoFormat.StylevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static BtcAutoFormat.Style[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        values

        +
        public static BtcAutoFormat.Style[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (BtcAutoFormat.Style c : BtcAutoFormat.Style.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static BtcAutoFormat.Style valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/BtcAutoFormat.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/BtcAutoFormat.html new file mode 100644 index 000000000..d53862f69 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/BtcAutoFormat.html @@ -0,0 +1,534 @@ + + + + + +BtcAutoFormat (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BtcAutoFormat

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.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:
    +
    Format, +NumberFormat, +DecimalFormat, +DecimalFormatSymbols, +Coin, +Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BtcAutoFormat

        +
        protected BtcAutoFormat​(java.util.Locale locale,
        +                        BtcAutoFormat.Style style,
        +                        int fractionPlaces)
        +
        Constructor
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        scale

        +
        protected int scale​(java.math.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​(java.lang.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 java.lang.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 java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/BtcFixedFormat.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/BtcFixedFormat.html new file mode 100644 index 000000000..1385eb2f6 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/BtcFixedFormat.html @@ -0,0 +1,662 @@ + + + + + +BtcFixedFormat (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BtcFixedFormat

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.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:
    +
    Format, +NumberFormat, +DecimalFormat, +Coin, +Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        BtcFixedFormat

        +
        protected BtcFixedFormat​(java.util.Locale locale,
        +                         int scale,
        +                         int minDecimals,
        +                         java.util.List<java.lang.Integer> groups)
        +
        Constructor
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        scale

        +
        protected int scale​(java.math.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 java.lang.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 java.lang.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​(java.lang.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:
        +
        Object.hashCode()
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.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 java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/BtcFormat.Builder.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/BtcFormat.Builder.html new file mode 100644 index 000000000..6209b8c32 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/BtcFormat.Builder.html @@ -0,0 +1,555 @@ + + + + + +BtcFormat.Builder (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BtcFormat.Builder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.utils.BtcFormat.Builder
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    BtcFormat
    +
    +
    +
    public static class BtcFormat.Builder
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        style

        +
        public BtcFormat.Builder style​(BtcAutoFormat.Style val)
        +
        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:
        +
        java.lang.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​(java.util.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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-alpha3/org/bitcoinj/utils/BtcFormat.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/BtcFormat.html new file mode 100644 index 000000000..46be884de --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/BtcFormat.html @@ -0,0 +1,2204 @@ + + + + + +BtcFormat (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BtcFormat

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.text.Format
    • +
    • +
        +
      • org.bitcoinj.utils.BtcFormat
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Cloneable
    +
    +
    +
    Direct Known Subclasses:
    +
    BtcAutoFormat, BtcFixedFormat
    +
    +
    +
    public abstract class BtcFormat
    +extends java.text.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:
    +
    Format, +NumberFormat, +DecimalFormat, +DecimalFormatSymbols, +FieldPosition, +Coin, +Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static class BtcFormat.Builder +
      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

        +java.text.Format.Field
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      static intCOIN_SCALE +
      A constant useful for specifying a denomination of bitcoins, the int value + 0.
      +
      protected static java.lang.StringCOIN_SYMBOL_ALT +
      An alternative currency symbol to use in locales where the default symbol is used for the national currency.
      +
      protected java.util.List<java.lang.Integer>decimalGroups 
      static intMICROCOIN_SCALE +
      A constant useful for specifying a denomination of microbitcoins, the int + value 6.
      +
      static intMILLICOIN_SCALE +
      A constant useful for specifying a denomination of millibitcoins, the int + value 3.
      +
      protected intminimumFractionDigits 
      protected java.text.DecimalFormatnumberFormat 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + +
      Constructors 
      ModifierConstructorDescription
      protected BtcFormat​(java.text.DecimalFormat numberFormat, + int minDecimals, + java.util.List<java.lang.Integer> groups) +
      This single constructor is invoked by the overriding subclass constructors.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static BtcFormat.Builderbuilder() +
      Return a new BtcFormat.Builder object.
      +
      java.lang.StringcoinCode() +
      Return the unprefixed international currency code for bitcoins configured for this + object.
      +
      java.lang.StringcoinSymbol() +
      Return the unprefixed currency symbol for bitcoins configured for this object.
      +
      booleanequals​(java.lang.Object o) +
      Return true if the given object is equivalent to this one.
      +
      java.lang.Stringformat​(java.lang.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.
      +
      java.lang.StringBufferformat​(java.lang.Object qty, + java.lang.StringBuffer toAppendTo, + java.text.FieldPosition pos) +
      Formats a bitcoin value as a number and possibly a units indicator and appends the + resulting text to the given string buffer.
      +
      java.lang.StringBufferformat​(java.lang.Object qty, + java.lang.StringBuffer toAppendTo, + java.text.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.
      +
      java.text.AttributedCharacterIteratorformatToCharacterIterator​(java.lang.Object obj) +
      Formats a bitcoin monetary value and returns an AttributedCharacterIterator.
      +
      static java.util.Locale[]getAvailableLocales() +
      Return an array of all locales for which the getInstance() method of this class can + return localized instances.
      +
      static BtcFormatgetCodeInstance() +
      Return a new auto-denominating instance that will indicate units using a currency + code, for example, "BTC".
      +
      static BtcFormatgetCodeInstance​(int minDecimals) +
      Return a new code-style auto-formatter with the given number of fractional decimal + places.
      +
      static BtcFormatgetCodeInstance​(java.util.Locale locale) +
      Return a new code-style auto-formatter for the given locale.
      +
      static BtcFormatgetCodeInstance​(java.util.Locale locale, + int minDecimals) +
      Return a new code-style auto-formatter for the given locale with the given number of + fraction places.
      +
      static BtcFormatgetCoinInstance() +
      Return a new coin-denominated formatter.
      +
      static BtcFormatgetCoinInstance​(int minFractionPlaces, + int... groups) +
      Return a new coin-denominated formatter with the specified fraction-places.
      +
      static BtcFormatgetCoinInstance​(java.util.Locale locale) +
      Return a new coin-denominated formatter for the given locale.
      +
      static BtcFormatgetCoinInstance​(java.util.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 BtcFormatgetInstance() +
      Return a new instance of this class using all defaults.
      +
      static BtcFormatgetInstance​(int scale) +
      Return a new fixed-denomination formatter.
      +
      static BtcFormatgetInstance​(int scale, + int minDecimals, + int... groups) +
      Return a new fixed-denomination formatter with the specified fractional decimal + placing.
      +
      static BtcFormatgetInstance​(int scale, + java.util.Locale locale) +
      Return a new fixed-denomination formatter for the given locale.
      +
      static BtcFormatgetInstance​(int scale, + java.util.Locale locale, + int minDecimals, + int... groups) +
      Return a new fixed-denomination formatter for the given locale, with the specified + fractional decimal placing.
      +
      static BtcFormatgetInstance​(int scale, + java.util.Locale locale, + int minDecimals, + java.util.List<java.lang.Integer> groups) +
      Return a new fixed-denomination formatter for the given locale, with the specified + fractional decimal placing.
      +
      static BtcFormatgetInstance​(java.util.Locale locale) +
      Return a new code-style auto-formatter for the given locale.
      +
      static BtcFormatgetInstance​(java.util.Locale locale, + int minDecimals) +
      Return a new code-style auto-formatter for the given locale with the given number of + fraction places.
      +
      static BtcFormatgetInstance​(BtcAutoFormat.Style style) +
      Return a new auto-denominating formatter.
      +
      static BtcFormatgetInstance​(BtcAutoFormat.Style style, + int fractionPlaces) +
      Return a new auto-denominating formatter with the given number of fractional decimal + places.
      +
      static BtcFormatgetInstance​(BtcAutoFormat.Style style, + java.util.Locale locale) +
      Return a new auto-formatter with the given style for the given locale.
      +
      static BtcFormatgetInstance​(BtcAutoFormat.Style style, + java.util.Locale locale, + int fractionPlaces) +
      Return a new auto-formatter for the given locale with the given number of fraction places.
      +
      static BtcFormatgetMicroInstance() +
      Return a new microcoin-denominated formatter for the default locale.
      +
      static BtcFormatgetMicroInstance​(int scale, + int... groups) +
      Return a new microcoin-denominated formatter with the specified fractional decimal + placing.
      +
      static BtcFormatgetMicroInstance​(java.util.Locale locale) +
      Return a new microcoin-denominated formatter for the given locale.
      +
      static BtcFormatgetMicroInstance​(java.util.Locale locale, + int scale, + int... groups) +
      Return a new microcoin-denominated formatter for the given locale with the specified + fractional decimal placing.
      +
      static BtcFormatgetMilliInstance() +
      Return a new millicoin-denominated formatter.
      +
      static BtcFormatgetMilliInstance​(int scale, + int... groups) +
      Return a new millicoin-denominated formatter with the specified fractional decimal + placing.
      +
      static BtcFormatgetMilliInstance​(java.util.Locale locale) +
      Return a new millicoin-denominated formatter for the given locale.
      +
      static BtcFormatgetMilliInstance​(java.util.Locale locale, + int scale, + int... groups) +
      Return a new millicoin-denominated formatter for the given locale with the specified + fractional decimal placing.
      +
      static BtcFormatgetSymbolInstance() +
      Return a new auto-denominating instance that will indicate units using a currency + symbol, for example, "฿".
      +
      static BtcFormatgetSymbolInstance​(int fractionPlaces) +
      Return a new symbol-style auto-formatter with the given number of fractional decimal + places.
      +
      static BtcFormatgetSymbolInstance​(java.util.Locale locale) +
      Return a new symbol-style auto-formatter for the given locale.
      +
      static BtcFormatgetSymbolInstance​(java.util.Locale locale, + int fractionPlaces) +
      Return a new symbol-style auto-formatter for the given locale with the given number of + fraction places.
      +
      inthashCode() +
      Return a hash code value for this instance.
      +
      protected static java.lang.Stringnegify​(java.lang.String pattern) +
      Guarantee a formatting pattern has a subpattern for negative values.
      +
      Coinparse​(java.lang.String source) +
      Parse a String representation of a Bitcoin monetary value.
      +
      Coinparse​(java.lang.String source, + java.text.ParsePosition pos) +
      Parse a String representation of a Bitcoin monetary value.
      +
      java.lang.ObjectparseObject​(java.lang.String source, + java.text.ParsePosition pos) +
      Parse a String representation of a Bitcoin monetary value.
      +
      java.lang.Stringpattern() +
      Return a representation of the pattern used by this instance for formatting and + parsing.
      +
      protected static java.lang.StringprefixCode​(java.lang.String code, + int scale) +
      END OF PARSING STUFF
      +
      protected static java.lang.StringprefixSymbol​(java.lang.String symbol, + int scale) 
      protected static voidprefixUnitsIndicator​(java.text.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 intscale() +
      Return the denomination of this object.
      +
      protected abstract intscale​(java.math.BigInteger satoshis, + int fractionPlaces) +
      Return the denomination for formatting the given value.
      +
      java.text.DecimalFormatSymbolssymbols() +
      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 Detail

      + + + +
        +
      • +

        COIN_SYMBOL_ALT

        +
        protected static final java.lang.String COIN_SYMBOL_ALT
        +
        An alternative currency symbol to use in locales where the default symbol is used for the national currency.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        numberFormat

        +
        protected final java.text.DecimalFormat numberFormat
        +
      • +
      + + + +
        +
      • +

        minimumFractionDigits

        +
        protected final int minimumFractionDigits
        +
      • +
      + + + +
        +
      • +

        decimalGroups

        +
        protected final java.util.List<java.lang.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:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        MILLICOIN_SCALE

        +
        public static final int MILLICOIN_SCALE
        +
        A constant useful for specifying a denomination of millibitcoins, the int + value 3.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        MICROCOIN_SCALE

        +
        public static final int MICROCOIN_SCALE
        +
        A constant useful for specifying a denomination of microbitcoins, the int + value 6.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BtcFormat

        +
        protected BtcFormat​(java.text.DecimalFormat numberFormat,
        +                    int minDecimals,
        +                    java.util.List<java.lang.Integer> groups)
        +
        This single constructor is invoked by the overriding subclass constructors.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        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​(java.util.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​(java.util.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​(java.util.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​(java.util.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​(java.util.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​(java.util.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,
        +                                    java.util.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,
        +                                    java.util.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​(java.util.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​(java.util.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​(java.util.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​(java.util.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​(java.util.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​(java.util.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,
        +                                    java.util.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,
        +                                    java.util.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,
        +                                    java.util.Locale locale,
        +                                    int minDecimals,
        +                                    java.util.List<java.lang.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 java.text.AttributedCharacterIterator formatToCharacterIterator​(java.lang.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 java.text.Format
        +
        See Also:
        +
        AttributedCharacterIterator
        +
        +
      • +
      + + + +
        +
      • +

        format

        +
        public java.lang.StringBuffer format​(java.lang.Object qty,
        +                                     java.lang.StringBuffer toAppendTo,
        +                                     java.text.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 java.text.Format
        +
        Returns:
        +
        the StringBuffer passed in as toAppendTo
        +
        +
      • +
      + + + +
        +
      • +

        format

        +
        public java.lang.String format​(java.lang.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:
        +
        java.lang.IllegalArgumentException - if the number of fraction places is negative.
        +
        +
      • +
      + + + +
        +
      • +

        format

        +
        public java.lang.StringBuffer format​(java.lang.Object qty,
        +                                     java.lang.StringBuffer toAppendTo,
        +                                     java.text.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:
        +
        java.lang.IllegalArgumentException - if the number of fraction places is negative.
        +
        +
      • +
      + + + +
        +
      • +

        scale

        +
        protected abstract int scale​(java.math.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 java.lang.Object parseObject​(java.lang.String source,
        +                                          java.text.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 java.text.Format
        +
        See Also:
        +
        NumberFormat
        +
        +
      • +
      + + + +
        +
      • +

        prefixUnitsIndicator

        +
        protected static void prefixUnitsIndicator​(java.text.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​(java.lang.String source,
        +                  java.text.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:
        +
        ParsePosition
        +
        +
      • +
      + + + +
        +
      • +

        parse

        +
        public Coin parse​(java.lang.String source)
        +           throws java.text.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:
        +
        java.text.ParseException
        +
        +
      • +
      + + + +
        +
      • +

        prefixCode

        +
        protected static java.lang.String prefixCode​(java.lang.String code,
        +                                             int scale)
        +
        END OF PARSING STUFF
        +
      • +
      + + + +
        +
      • +

        prefixSymbol

        +
        protected static java.lang.String prefixSymbol​(java.lang.String symbol,
        +                                               int scale)
        +
      • +
      + + + +
        +
      • +

        negify

        +
        protected static java.lang.String negify​(java.lang.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 java.util.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 java.lang.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 java.lang.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 java.lang.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 java.text.DecimalFormatSymbols symbols()
        +
        Return a copy of the localized symbols used by this instance for formatting and parsing.
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.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 java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        Return a hash code value for this instance.
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        See Also:
        +
        Object.hashCode()
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/ContextPropagatingThreadFactory.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/ContextPropagatingThreadFactory.html new file mode 100644 index 000000000..89ee0d7b0 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/ContextPropagatingThreadFactory.html @@ -0,0 +1,330 @@ + + + + + +ContextPropagatingThreadFactory (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ContextPropagatingThreadFactory

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.utils.ContextPropagatingThreadFactory
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.util.concurrent.ThreadFactory
    +
    +
    +
    public class ContextPropagatingThreadFactory
    +extends java.lang.Object
    +implements java.util.concurrent.ThreadFactory
    +
    A ThreadFactory that propagates a Context from the creating + thread into the new thread. This factory creates daemon threads.
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.ThreadnewThread​(java.lang.Runnable r) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        ContextPropagatingThreadFactory

        +
        public ContextPropagatingThreadFactory​(java.lang.String name,
        +                                       int priority)
        +
      • +
      + + + +
        +
      • +

        ContextPropagatingThreadFactory

        +
        public ContextPropagatingThreadFactory​(java.lang.String name)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        newThread

        +
        public java.lang.Thread newThread​(java.lang.Runnable r)
        +
        +
        Specified by:
        +
        newThread in interface java.util.concurrent.ThreadFactory
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/DaemonThreadFactory.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/DaemonThreadFactory.html new file mode 100644 index 000000000..c0a39bb69 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/DaemonThreadFactory.html @@ -0,0 +1,329 @@ + + + + + +DaemonThreadFactory (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DaemonThreadFactory

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.utils.DaemonThreadFactory
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.util.concurrent.ThreadFactory
    +
    +
    +
    public class DaemonThreadFactory
    +extends java.lang.Object
    +implements java.util.concurrent.ThreadFactory
    +
    Thread factory whose threads are marked as daemon and won't prevent process exit.
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.ThreadnewThread​(java.lang.Runnable runnable) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        DaemonThreadFactory

        +
        public DaemonThreadFactory​(@Nullable
        +                           java.lang.String name)
        +
      • +
      + + + +
        +
      • +

        DaemonThreadFactory

        +
        public DaemonThreadFactory()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        newThread

        +
        public java.lang.Thread newThread​(@Nonnull
        +                                  java.lang.Runnable runnable)
        +
        +
        Specified by:
        +
        newThread in interface java.util.concurrent.ThreadFactory
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/ExchangeRate.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/ExchangeRate.html new file mode 100644 index 000000000..11db48a06 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/ExchangeRate.html @@ -0,0 +1,446 @@ + + + + + +ExchangeRate (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ExchangeRate

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.utils.ExchangeRate
    • +
    +
  • +
+
+
    +
  • +
    +
    public class ExchangeRate
    +extends java.lang.Object
    +
    An exchange rate is expressed as a ratio of a Coin and a Fiat amount.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      Coincoin 
      Fiatfiat 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      ExchangeRate​(Coin coin, + Fiat fiat) +
      Construct exchange rate.
      +
      ExchangeRate​(Fiat fiat) +
      Construct exchange rate.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      FiatcoinToFiat​(Coin convertCoin) +
      Convert a coin amount to a fiat amount using this exchange rate.
      +
      booleanequals​(java.lang.Object o) 
      CoinfiatToCoin​(Fiat convertFiat) +
      Convert a fiat amount to a coin amount using this exchange rate.
      +
      inthashCode() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        coin

        +
        public final Coin coin
        +
      • +
      + + + +
        +
      • +

        fiat

        +
        public final Fiat fiat
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        coinToFiat

        +
        public Fiat coinToFiat​(Coin convertCoin)
        +
        Convert a coin amount to a fiat amount using this exchange rate.
        +
        +
        Throws:
        +
        java.lang.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:
        +
        java.lang.ArithmeticException - if the converted coin amount is too high or too low.
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/ExponentialBackoff.Params.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/ExponentialBackoff.Params.html new file mode 100644 index 000000000..d678fec98 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/ExponentialBackoff.Params.html @@ -0,0 +1,297 @@ + + + + + +ExponentialBackoff.Params (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ExponentialBackoff.Params

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.utils.ExponentialBackoff.Params
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    ExponentialBackoff
    +
    +
    +
    public static class ExponentialBackoff.Params
    +extends java.lang.Object
    +
    Parameters to configure a particular kind of exponential backoff.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Params() +
      Construct params with default values.
      +
      Params​(java.time.Duration initialInterval, + float multiplier, + java.time.Duration maximumInterval) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        Params

        +
        public Params​(java.time.Duration initialInterval,
        +              float multiplier,
        +              java.time.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-alpha3/org/bitcoinj/utils/ExponentialBackoff.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/ExponentialBackoff.html new file mode 100644 index 000000000..eed418729 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/ExponentialBackoff.html @@ -0,0 +1,507 @@ + + + + + +ExponentialBackoff (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ExponentialBackoff

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.utils.ExponentialBackoff
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.lang.Comparable<ExponentialBackoff>
    +
    +
    +
    public class ExponentialBackoff
    +extends java.lang.Object
    +implements java.lang.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 Detail

      + + + +
        +
      • +

        DEFAULT_INITIAL_INTERVAL

        +
        public static final java.time.Duration DEFAULT_INITIAL_INTERVAL
        +
      • +
      + + + +
        +
      • +

        DEFAULT_MULTIPLIER

        +
        public static final float DEFAULT_MULTIPLIER
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        DEFAULT_MAXIMUM_INTERVAL

        +
        public static final java.time.Duration DEFAULT_MAXIMUM_INTERVAL
        +
      • +
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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 java.time.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
        +
      • +
      + + + + + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/ListenableCompletableFuture.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/ListenableCompletableFuture.html new file mode 100644 index 000000000..56a233a28 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/ListenableCompletableFuture.html @@ -0,0 +1,438 @@ + + + + + +ListenableCompletableFuture (bitcoinj-core 0.17-SNAPSHOT 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>, java.util.concurrent.CompletionStage<V>, java.util.concurrent.Future<V>, ListenableCompletionStage<V>
    +
    +
    +
    public class ListenableCompletableFuture<V>
    +extends java.util.concurrent.CompletableFuture<V>
    +implements ListenableCompletionStage<V>
    +
    A CompletableFuture that is also a ListenableFuture for migration + from Guava ListenableFuture to CompletableFuture.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture

        +java.util.concurrent.CompletableFuture.AsynchronousCompletionTask
      • +
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static <T> ListenableCompletableFuture<T>completedFuture​(T value) +
      Returns a new CompletableFuture that is already completed with + the given value.
      +
      static <T> ListenableCompletableFuture<T>failedFuture​(java.lang.Throwable throwable) +
      Returns a new ListenableCompletableFuture that is already completed exceptionally + with the given throwable.
      +
      static <T> ListenableCompletableFuture<T>of​(java.util.concurrent.CompletableFuture<T> future) +
      Converts a generic CompletableFuture to a ListenableCompletableFuture.
      +
      +
        +
      • + + +

        Methods inherited from class java.util.concurrent.CompletableFuture

        +acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completeAsync, completeAsync, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

        Methods inherited from interface java.util.concurrent.CompletionStage

        +acceptEither, acceptEitherAsync, acceptEitherAsync, applyToEither, applyToEitherAsync, applyToEitherAsync, exceptionally, handle, handleAsync, handleAsync, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, whenComplete, whenCompleteAsync, whenCompleteAsync
      • +
      +
        +
      • + + +

        Methods inherited from interface java.util.concurrent.Future

        +cancel, get, get, isCancelled, isDone
      • +
      + +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ListenableCompletableFuture

        +
        public ListenableCompletableFuture()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        completedFuture

        +
        public static <T> ListenableCompletableFuture<T> completedFuture​(T value)
        +
        Returns a new CompletableFuture that is already completed with + the given value. +

        + When the migration to CompletableFuture is finished use of this method + can be replaced with CompletableFuture.completedFuture(Object).

        +
        +
        Type Parameters:
        +
        T - the type of the value
        +
        Parameters:
        +
        value - the value
        +
        Returns:
        +
        the completed CompletableFuture
        +
        +
      • +
      + + + +
        +
      • +

        failedFuture

        +
        public static <T> ListenableCompletableFuture<T> failedFuture​(java.lang.Throwable throwable)
        +
        Returns a new ListenableCompletableFuture that is already completed exceptionally + with the given throwable. +

        + When the migration to CompletableFuture is finished this can be deprecated + and FutureUtils.failedFuture(Throwable) can be used instead.

        +
        +
        Type Parameters:
        +
        T - the type of the expected value
        +
        Parameters:
        +
        throwable - the exceptions
        +
        Returns:
        +
        the completed CompletableFuture
        +
        +
      • +
      + + + +
        +
      • +

        of

        +
        public static <T> ListenableCompletableFuture<T> of​(java.util.concurrent.CompletableFuture<T> future)
        +
        Converts a generic CompletableFuture to a ListenableCompletableFuture. If the passed + in future is already a ListenableCompletableFuture no conversion is performed. +

        + When the migration to CompletableFuture is finished usages of this method + can simply be removed as the conversion will no longer be required.

        +
        +
        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-alpha3/org/bitcoinj/utils/ListenableCompletionStage.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/ListenableCompletionStage.html new file mode 100644 index 000000000..3962cfde6 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/ListenableCompletionStage.html @@ -0,0 +1,290 @@ + + + + + +ListenableCompletionStage (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface ListenableCompletionStage<V>

+
+
+
+
    +
  • +
    +
    All Superinterfaces:
    +
    java.util.concurrent.CompletionStage<V>, java.util.concurrent.Future<V>, com.google.common.util.concurrent.ListenableFuture<V>
    +
    +
    +
    All Known Implementing Classes:
    +
    ListenableCompletableFuture
    +
    +
    +
    public interface ListenableCompletionStage<V>
    +extends java.util.concurrent.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. +

    + Note that this is much easier to implement than trying to extend AbstractFuture + to implement CompletionStage.

    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Default Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      default voidaddListener​(java.lang.Runnable listener, + java.util.concurrent.Executor executor) +
      Deprecated. +
      Use CompletableFuture and CompletableFuture.thenRunAsync(Runnable, Executor)
      +
      +
      +
        +
      • + + +

        Methods inherited from interface java.util.concurrent.CompletionStage

        +acceptEither, acceptEitherAsync, acceptEitherAsync, applyToEither, applyToEitherAsync, applyToEitherAsync, exceptionally, handle, handleAsync, handleAsync, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, whenComplete, whenCompleteAsync, whenCompleteAsync
      • +
      +
        +
      • + + +

        Methods inherited from interface java.util.concurrent.Future

        +cancel, get, get, isCancelled, isDone
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        addListener

        +
        @Deprecated
        +default void addListener​(java.lang.Runnable listener,
        +                         java.util.concurrent.Executor executor)
        +
        Deprecated. +
        Use CompletableFuture and CompletableFuture.thenRunAsync(Runnable, Executor)
        +
        +
        +
        Specified by:
        +
        addListener in interface com.google.common.util.concurrent.ListenableFuture<V>
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/ListenerRegistration.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/ListenerRegistration.html new file mode 100644 index 000000000..e99dd07f8 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/ListenerRegistration.html @@ -0,0 +1,381 @@ + + + + + +ListenerRegistration (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ListenerRegistration<T>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.utils.ListenerRegistration<T>
    • +
    +
  • +
+
+
    +
  • +
    +
    public class ListenerRegistration<T>
    +extends java.lang.Object
    +
    A simple wrapper around a listener and an executor, with some utility methods.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      java.util.concurrent.Executorexecutor 
      Tlistener 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      ListenerRegistration​(T listener, + java.util.concurrent.Executor executor) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static <T> booleanremoveFromList​(T listener, + java.util.List<? extends ListenerRegistration<T>> list) +
      Remove wrapped listener
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        listener

        +
        public final T listener
        +
      • +
      + + + +
        +
      • +

        executor

        +
        public final java.util.concurrent.Executor executor
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + + + +
        +
      • +

        ListenerRegistration

        +
        public ListenerRegistration​(T listener,
        +                            java.util.concurrent.Executor executor)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        removeFromList

        +
        public static <T> boolean removeFromList​(T listener,
        +                                         java.util.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-alpha3/org/bitcoinj/utils/TaggableObject.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/TaggableObject.html new file mode 100644 index 000000000..27490ce73 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/TaggableObject.html @@ -0,0 +1,333 @@ + + + + + +TaggableObject (bitcoinj-core 0.17-SNAPSHOT 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

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and TypeMethodDescription
      com.google.protobuf.ByteStringgetTag​(java.lang.String tag) +
      Deprecated.
      +
      java.util.Map<java.lang.String,​com.google.protobuf.ByteString>getTags() +
      Deprecated.
      +
      com.google.protobuf.ByteStringmaybeGetTag​(java.lang.String tag) +
      Deprecated.
      +
      voidsetTag​(java.lang.String tag, + com.google.protobuf.ByteString value) +
      Deprecated.
      +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        maybeGetTag

        +
        @Deprecated
        +@Nullable
        +com.google.protobuf.ByteString maybeGetTag​(java.lang.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​(java.lang.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​(java.lang.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
        +java.util.Map<java.lang.String,​com.google.protobuf.ByteString> getTags()
        +
        Deprecated.
        +
        Returns a copy of all the tags held by this object.
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/Threading.UserThread.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/Threading.UserThread.html new file mode 100644 index 000000000..bb2c0c178 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/Threading.UserThread.html @@ -0,0 +1,415 @@ + + + + + +Threading.UserThread (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Threading.UserThread

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Thread
    • +
    • +
        +
      • org.bitcoinj.utils.Threading.UserThread
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.lang.Runnable, java.util.concurrent.Executor
    +
    +
    +
    Enclosing class:
    +
    Threading
    +
    +
    +
    public static class Threading.UserThread
    +extends java.lang.Thread
    +implements java.util.concurrent.Executor
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.lang.Thread

        +java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      static intWARNING_THRESHOLD 
      +
        +
      • + + +

        Fields inherited from class java.lang.Thread

        +MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      UserThread() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidexecute​(java.lang.Runnable command) 
      voidrun() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Thread

        +activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        WARNING_THRESHOLD

        +
        public static int WARNING_THRESHOLD
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        UserThread

        +
        public UserThread()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        run

        +
        public void run()
        +
        +
        Specified by:
        +
        run in interface java.lang.Runnable
        +
        Overrides:
        +
        run in class java.lang.Thread
        +
        +
      • +
      + + + +
        +
      • +

        execute

        +
        public void execute​(java.lang.Runnable command)
        +
        +
        Specified by:
        +
        execute in interface java.util.concurrent.Executor
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/Threading.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/Threading.html new file mode 100644 index 000000000..285e9cb6c --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/Threading.html @@ -0,0 +1,560 @@ + + + + + +Threading (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Threading

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.utils.Threading
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Threading
    +extends java.lang.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 TypeClassDescription
      static class Threading.UserThread 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      static com.google.common.util.concurrent.CycleDetectingLockFactoryfactory 
      static java.util.concurrent.ExecutorSAME_THREAD +
      A dummy executor that just invokes the runnable immediately.
      +
      static java.util.concurrent.ExecutorServiceTHREAD_POOL +
      A caching thread pool that creates daemon threads, which won't keep the JVM alive waiting for more work.
      +
      static java.lang.Thread.UncaughtExceptionHandleruncaughtExceptionHandler +
      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 java.util.concurrent.ExecutorUSER_THREAD +
      An executor with one thread that is intended for running event listeners on.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Threading() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static com.google.common.util.concurrent.CycleDetectingLockFactory.PolicygetPolicy() 
      static voidignoreLockCycles() 
      static java.util.concurrent.locks.ReentrantLocklock​(java.lang.Class clazz) 
      static java.util.concurrent.locks.ReentrantLocklock​(java.lang.String name) 
      static voidsetPolicy​(com.google.common.util.concurrent.CycleDetectingLockFactory.Policy policy) 
      static voidthrowOnLockCycles() 
      static voidwaitForUserCode() +
      Put a dummy task into the queue and wait for it to be run.
      +
      static voidwarnOnLockCycles() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        USER_THREAD

        +
        public static java.util.concurrent.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 java.util.concurrent.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 java.lang.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 java.util.concurrent.ExecutorService THREAD_POOL
        +
        A caching thread pool that creates daemon threads, which won't keep the JVM alive waiting for more work.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Threading

        +
        public Threading()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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 java.util.concurrent.locks.ReentrantLock lock​(java.lang.Class clazz)
        +
      • +
      + + + +
        +
      • +

        lock

        +
        public static java.util.concurrent.locks.ReentrantLock lock​(java.lang.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-alpha3/org/bitcoinj/utils/VersionTally.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/VersionTally.html new file mode 100644 index 000000000..c6f2e3bae --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/VersionTally.html @@ -0,0 +1,392 @@ + + + + + +VersionTally (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class VersionTally

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.utils.VersionTally
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidadd​(long version) +
      Add a new block version to the tally, and return the count for that version + within the window.
      +
      java.lang.IntegergetCountAtOrAbove​(long version) +
      Get the count of blocks at or above the given version, within the window.
      +
      voidinitialize​(BlockStore blockStore, + StoredBlock chainHead) +
      Initialize the version tally from the block store.
      +
      intsize() +
      Get the size of the version window.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Method Detail

      + + + +
        +
      • +

        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 java.lang.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-alpha3/org/bitcoinj/utils/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/package-summary.html new file mode 100644 index 000000000..528c555a8 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/package-summary.html @@ -0,0 +1,321 @@ + + + + + +org.bitcoinj.utils (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

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.
+
+
    +
  • + + + + + + + + + + + + + + + + +
    Interface Summary 
    InterfaceDescription
    ListenableCompletionStage<V> +
    A CompletionStage with a ListenableFuture-compatible interface to smooth migration + from Guava ListenableFuture to CompletableFuture/CompletionStage.
    +
    TaggableObjectDeprecated. +
    Applications should use another mechanism to persist application state data
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    AppDataDirectory +
    Find/create App Data Directory in correct platform-specific location.
    +
    BaseTaggableObjectDeprecated. +
    Applications should use another mechanism to persist application state data
    +
    BlockFileLoader +
    This class reads block files stored in the Bitcoin Core format.
    +
    BriefLogFormatter +
    A Java logging formatter that writes more compact output than the default.
    +
    BtcAutoFormat +
    This class, a concrete extension of BtcFormat, is distinguished by its + accommodation of multiple denominational units as follows:
    +
    BtcFixedFormat +
    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.
    +
    BtcFormat +
    Instances of this class format and parse locale-specific numerical + representations of Bitcoin monetary values.
    +
    BtcFormat.Builder +
    This class constructs new instances of BtcFormat, allowing for the + configuration of those instances before they are constructed.
    +
    ContextPropagatingThreadFactory +
    A ThreadFactory that propagates a Context from the creating + thread into the new thread.
    +
    DaemonThreadFactory +
    Thread factory whose threads are marked as daemon and won't prevent process exit.
    +
    ExchangeRate +
    An exchange rate is expressed as a ratio of a Coin and a Fiat amount.
    +
    ExponentialBackoff +
    Tracks successes and failures and calculates a time to retry the operation.
    +
    ExponentialBackoff.Params +
    Parameters to configure a particular kind of exponential backoff.
    +
    ListenableCompletableFuture<V> +
    A CompletableFuture that is also a ListenableFuture for migration + from Guava ListenableFuture to CompletableFuture.
    +
    ListenerRegistration<T> +
    A simple wrapper around a listener and an executor, with some utility methods.
    +
    Threading +
    Various threading related utilities.
    +
    Threading.UserThread 
    VersionTally +
    Caching counter for the block versions within a moving window.
    +
    +
  • +
  • + + + + + + + + + + + + +
    Enum Summary 
    EnumDescription
    BtcAutoFormat.Style +
    Enum for specifying the style of currency indicators that are used + when formatting, either codes or symbols.
    +
    +
  • +
+
+
+
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/utils/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/utils/package-tree.html new file mode 100644 index 000000000..db52adcf0 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/utils/package-tree.html @@ -0,0 +1,232 @@ + + + + + +org.bitcoinj.utils Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.utils

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+
    +
  • java.util.concurrent.CompletionStage<T> + +
  • +
  • java.util.concurrent.Future<V> +
      +
    • com.google.common.util.concurrent.ListenableFuture<V> + +
    • +
    +
  • +
  • org.bitcoinj.utils.TaggableObject
  • +
+
+
+

Enum Hierarchy

+
    +
  • java.lang.Object +
      +
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) + +
    • +
    +
  • +
+
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/AllRandomKeysRotating.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/AllRandomKeysRotating.html new file mode 100644 index 000000000..bc25e7ebf --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/AllRandomKeysRotating.html @@ -0,0 +1,298 @@ + + + + + +AllRandomKeysRotating (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class AllRandomKeysRotating

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • java.lang.RuntimeException
        • +
        • +
            +
          • org.bitcoinj.wallet.AllRandomKeysRotating
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class AllRandomKeysRotating
    +extends java.lang.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        AllRandomKeysRotating

        +
        public AllRandomKeysRotating()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/AllowUnconfirmedCoinSelector.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/AllowUnconfirmedCoinSelector.html new file mode 100644 index 000000000..f368f9556 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/AllowUnconfirmedCoinSelector.html @@ -0,0 +1,344 @@ + + + + + +AllowUnconfirmedCoinSelector (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class 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 Detail

      + + + +
        +
      • +

        AllowUnconfirmedCoinSelector

        +
        public AllowUnconfirmedCoinSelector()
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/BasicKeyChain.State.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/BasicKeyChain.State.html new file mode 100644 index 000000000..c78d3f15f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/BasicKeyChain.State.html @@ -0,0 +1,394 @@ + + + + + +BasicKeyChain.State (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum BasicKeyChain.State

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<BasicKeyChain.State>
    +
    +
    +
    Enclosing class:
    +
    BasicKeyChain
    +
    +
    +
    public static enum BasicKeyChain.State
    +extends java.lang.Enum<BasicKeyChain.State>
    +
    Whether this basic key chain is empty, full of regular (usable for signing) keys, or full of watching keys.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      EMPTY 
      REGULAR 
      WATCHING 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static BasicKeyChain.StatevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static BasicKeyChain.State[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static BasicKeyChain.State[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (BasicKeyChain.State c : BasicKeyChain.State.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static BasicKeyChain.State valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/BasicKeyChain.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/BasicKeyChain.html new file mode 100644 index 000000000..82978283d --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/BasicKeyChain.html @@ -0,0 +1,1113 @@ + + + + + +BasicKeyChain (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BasicKeyChain

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.BasicKeyChain
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    EncryptableKeyChain, KeyChain
    +
    +
    +
    public class BasicKeyChain
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        BasicKeyChain

        +
        public BasicKeyChain()
        +
      • +
      + + + +
        +
      • +

        BasicKeyChain

        +
        public BasicKeyChain​(@Nullable
        +                     KeyCrypter crypter)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        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 java.util.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 java.util.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​(java.util.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 java.time.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        serializeToProtobuf

        +
        public java.util.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​(java.util.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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,
        +                             java.util.concurrent.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        toEncrypted

        +
        public BasicKeyChain toEncrypted​(java.lang.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​(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​(java.lang.CharSequence password)
        +
        Returns whether the given password is correct for this key chain.
        +
        +
        Specified by:
        +
        checkPassword in interface EncryptableKeyChain
        +
        Throws:
        +
        java.lang.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        findOldestKeyAfter

        +
        public java.util.Optional<ECKey> findOldestKeyAfter​(java.time.Instant time)
        +
        Returns the first ECKey created after the given time, or empty if there is none.
        +
      • +
      + + + + + + + +
        +
      • +

        findKeysBefore

        +
        public java.util.List<ECKey> findKeysBefore​(java.time.Instant time)
        +
        Returns a list of all ECKeys created after the given time.
        +
      • +
      + + + +
        +
      • +

        findKeysBefore

        +
        @Deprecated
        +public java.util.List<ECKey> findKeysBefore​(long timeSecs)
        +
        Deprecated. + +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString​(boolean includePrivateKeys,
        +                                 @Nullable
        +                                 AesKey aesKey,
        +                                 Network network)
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/CoinSelection.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/CoinSelection.html new file mode 100644 index 000000000..2dff9ac85 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/CoinSelection.html @@ -0,0 +1,424 @@ + + + + + +CoinSelection (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CoinSelection

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.CoinSelection
    • +
    +
  • +
+
+
    +
  • +
    +
    public class CoinSelection
    +extends java.lang.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.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        totalValue

        +
        public Coin totalValue()
        +
        +
        Returns:
        +
        Total value of gathered outputs.
        +
        +
      • +
      + + + +
        +
      • +

        outputs

        +
        public java.util.List<TransactionOutput> outputs()
        +
        +
        Returns:
        +
        List of gathered outputs
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/CoinSelector.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/CoinSelector.html new file mode 100644 index 000000000..54d6cdd82 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/CoinSelector.html @@ -0,0 +1,291 @@ + + + + + +CoinSelector (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        select

        +
        CoinSelection select​(Coin target,
        +                     java.util.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​(java.util.function.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-alpha3/org/bitcoinj/wallet/DecryptingKeyBag.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DecryptingKeyBag.html new file mode 100644 index 000000000..732f52bba --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DecryptingKeyBag.html @@ -0,0 +1,443 @@ + + + + + +DecryptingKeyBag (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DecryptingKeyBag

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.DecryptingKeyBag
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    KeyBag
    +
    +
    +
    public class DecryptingKeyBag
    +extends java.lang.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 Summary

      + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      protected AesKeyaesKey 
      protected KeyBagtarget 
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      ECKeyfindKeyFromPubKey​(byte[] pubKey) +
      Locates a keypair from the keychain given the raw public key bytes.
      +
      ECKeyfindKeyFromPubKeyHash​(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.
      +
      RedeemDatafindRedeemDataFromScriptHash​(byte[] scriptHash) +
      Locates a redeem data (redeem script and keys) from the keychain given the hash of the script.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Field Detail

      + + + +
        +
      • +

        target

        +
        protected final KeyBag target
        +
      • +
      + + + +
        +
      • +

        aesKey

        +
        protected final AesKey aesKey
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        DecryptingKeyBag

        +
        public DecryptingKeyBag​(KeyBag target,
        +                        @Nullable
        +                        AesKey aesKey)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/wallet/DefaultCoinSelector.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultCoinSelector.html new file mode 100644 index 000000000..8a3c50546 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultCoinSelector.html @@ -0,0 +1,415 @@ + + + + + +DefaultCoinSelector (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DefaultCoinSelector

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.DefaultCoinSelector
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    CoinSelector
    +
    +
    +
    Direct Known Subclasses:
    +
    AllowUnconfirmedCoinSelector
    +
    +
    +
    public class DefaultCoinSelector
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        DefaultCoinSelector

        +
        protected DefaultCoinSelector()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        select

        +
        public CoinSelection select​(Coin target,
        +                            java.util.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
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultKeyChainFactory.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultKeyChainFactory.html new file mode 100644 index 000000000..cda28bd04 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultKeyChainFactory.html @@ -0,0 +1,400 @@ + + + + + +DefaultKeyChainFactory (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DefaultKeyChainFactory

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.DefaultKeyChainFactory
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    KeyChainFactory
    +
    +
    +
    public class DefaultKeyChainFactory
    +extends java.lang.Object
    +implements KeyChainFactory
    +
    Default factory for creating keychains while de-serializing.
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultRiskAnalysis.Analyzer.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultRiskAnalysis.Analyzer.html new file mode 100644 index 000000000..4b82e75d3 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultRiskAnalysis.Analyzer.html @@ -0,0 +1,321 @@ + + + + + +DefaultRiskAnalysis.Analyzer (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DefaultRiskAnalysis.Analyzer

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.DefaultRiskAnalysis.Analyzer
    • +
    +
  • +
+
+ +
+
+ +
+
+ +
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultRiskAnalysis.RuleViolation.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultRiskAnalysis.RuleViolation.html new file mode 100644 index 000000000..a6e25a9a1 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultRiskAnalysis.RuleViolation.html @@ -0,0 +1,434 @@ + + + + + +DefaultRiskAnalysis.RuleViolation (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum DefaultRiskAnalysis.RuleViolation

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static DefaultRiskAnalysis.RuleViolation[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (DefaultRiskAnalysis.RuleViolation c : DefaultRiskAnalysis.RuleViolation.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static DefaultRiskAnalysis.RuleViolation valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultRiskAnalysis.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultRiskAnalysis.html new file mode 100644 index 000000000..fc0ebe443 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DefaultRiskAnalysis.html @@ -0,0 +1,536 @@ + + + + + +DefaultRiskAnalysis (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DefaultRiskAnalysis

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.DefaultRiskAnalysis
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    RiskAnalysis
    +
    +
    +
    public class DefaultRiskAnalysis
    +extends java.lang.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.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        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.

        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicKeyChain.Builder.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicKeyChain.Builder.html new file mode 100644 index 000000000..73935177b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicKeyChain.Builder.html @@ -0,0 +1,708 @@ + + + + + +DeterministicKeyChain.Builder (bitcoinj-core 0.17-SNAPSHOT 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 java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        random

        +
        protected java.security.SecureRandom random
        +
      • +
      + + + +
        +
      • +

        bits

        +
        protected int bits
        +
      • +
      + + + +
        +
      • +

        passphrase

        +
        protected java.lang.String passphrase
        +
      • +
      + + + +
        +
      • +

        creationTime

        +
        @Nullable
        +protected java.time.Instant creationTime
        +
      • +
      + + + +
        +
      • +

        entropy

        +
        protected byte[] entropy
        +
      • +
      + + + + + + + +
        +
      • +

        outputScriptType

        +
        protected ScriptType outputScriptType
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        accountPath

        +
        protected HDPath accountPath
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Builder

        +
        protected Builder()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        self

        +
        protected T self()
        +
      • +
      + + + +
        +
      • +

        entropy

        +
        public T entropy​(byte[] entropy,
        +                 java.time.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​(java.security.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​(java.security.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​(java.lang.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.
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        getPassphrase

        +
        protected java.lang.String getPassphrase()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicKeyChain.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicKeyChain.html new file mode 100644 index 000000000..b6336c984 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicKeyChain.html @@ -0,0 +1,1814 @@ + + + + + +DeterministicKeyChain (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DeterministicKeyChain

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.DeterministicKeyChain
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    EncryptableKeyChain, KeyChain
    +
    +
    +
    public class DeterministicKeyChain
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        lock

        +
        protected final java.util.concurrent.locks.ReentrantLock lock
        +
      • +
      + + + +
        +
      • +

        DEFAULT_PASSPHRASE_FOR_MNEMONIC

        +
        public static final java.lang.String DEFAULT_PASSPHRASE_FOR_MNEMONIC
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        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,
        +                                java.util.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. +

        +
      • +
      + + + + +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        getAccountPath

        +
        public HDPath getAccountPath()
        +
      • +
      + + + +
        +
      • +

        getOutputScriptType

        +
        public ScriptType getOutputScriptType()
        +
      • +
      + + + + + + + +
        +
      • +

        getKeys

        +
        public java.util.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)
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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​(java.util.List<ChildNumber> path)
        +
        Returns the deterministic key for the given absolute path in the hierarchy.
        +
      • +
      + + + +
        +
      • +

        getKeyByPath

        +
        public DeterministicKey getKeyByPath​(java.util.List<ChildNumber> path,
        +                                     boolean create)
        +
        Returns the deterministic key for the given absolute path in the hierarchy, optionally creating it
        +
      • +
      + + + + + + + +
        +
      • +

        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 java.time.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,
        +                             java.util.concurrent.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getMnemonicCode

        +
        @Nullable
        +public java.util.List<java.lang.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 java.util.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 java.util.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)
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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​(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,
        +                                                     java.util.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.
        +
      • +
      + + + + + + + + + + + + + + + + + + + +
        +
      • +

        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 java.util.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 java.util.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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString​(boolean includeLookahead,
        +                                 boolean includePrivateKeys,
        +                                 @Nullable
        +                                 AesKey aesKey,
        +                                 Network network)
        +
      • +
      + + + + + + + +
        +
      • +

        formatAddresses

        +
        protected void formatAddresses​(boolean includeLookahead,
        +                               boolean includePrivateKeys,
        +                               @Nullable
        +                               AesKey aesKey,
        +                               Network network,
        +                               java.lang.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-alpha3/org/bitcoinj/wallet/DeterministicSeed.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicSeed.html new file mode 100644 index 000000000..46a7f5672 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicSeed.html @@ -0,0 +1,1056 @@ + + + + + +DeterministicSeed (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DeterministicSeed

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.DeterministicSeed
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    EncryptableItem
    +
    +
    +
    public class DeterministicSeed
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        DEFAULT_SEED_ENTROPY_BITS

        +
        public static final int DEFAULT_SEED_ENTROPY_BITS
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        MAX_SEED_ENTROPY_BITS

        +
        public static final int MAX_SEED_ENTROPY_BITS
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        ofMnemonic

        +
        public static DeterministicSeed ofMnemonic​(java.lang.String mnemonicCode,
        +                                           java.lang.String passphrase,
        +                                           java.time.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​(java.lang.String mnemonicCode,
        +                                           java.lang.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​(java.util.List<java.lang.String> mnemonicCode,
        +                                           java.lang.String passphrase,
        +                                           java.time.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​(java.util.List<java.lang.String> mnemonicCode,
        +                                           java.lang.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,
        +                                          java.lang.String passphrase,
        +                                          java.time.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,
        +                                          java.lang.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​(java.security.SecureRandom random,
        +                                         int bits,
        +                                         java.lang.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        toString

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

        toString

        +
        public java.lang.String toString​(boolean includePrivate)
        +
      • +
      + + + +
        +
      • +

        toHexString

        +
        @Nullable
        +public java.lang.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()
        +
      • +
      + + + + + + + +
        +
      • +

        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()
        +
      • +
      + + + +
        +
      • +

        creationTime

        +
        public java.util.Optional<java.time.Instant> creationTime()
        +
        Description copied from interface: EncryptableItem
        +
        Returns the time at which this encryptable item was first created/derived, or empty of unknown.
        +
        +
        Specified by:
        +
        creationTime in interface EncryptableItem
        +
        +
      • +
      + + + +
        +
      • +

        setCreationTime

        +
        public void setCreationTime​(java.time.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. + +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.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 java.util.List<java.lang.String> getMnemonicCode()
        +
        Get the mnemonic code, or null if unknown.
        +
      • +
      + + + +
        +
      • +

        getMnemonicString

        +
        @Nullable
        +public java.lang.String getMnemonicString()
        +
        Get the mnemonic code as string, or null if unknown.
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicUpgradeRequiredException.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicUpgradeRequiredException.html new file mode 100644 index 000000000..ef44f66e5 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicUpgradeRequiredException.html @@ -0,0 +1,298 @@ + + + + + +DeterministicUpgradeRequiredException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DeterministicUpgradeRequiredException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • java.lang.RuntimeException
        • +
        • +
            +
          • org.bitcoinj.wallet.DeterministicUpgradeRequiredException
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class DeterministicUpgradeRequiredException
    +extends java.lang.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        DeterministicUpgradeRequiredException

        +
        public DeterministicUpgradeRequiredException()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicUpgradeRequiresPassword.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicUpgradeRequiresPassword.html new file mode 100644 index 000000000..9793e8dba --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/DeterministicUpgradeRequiresPassword.html @@ -0,0 +1,299 @@ + + + + + +DeterministicUpgradeRequiresPassword (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DeterministicUpgradeRequiresPassword

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • java.lang.RuntimeException
        • +
        • +
            +
          • org.bitcoinj.wallet.DeterministicUpgradeRequiresPassword
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class DeterministicUpgradeRequiresPassword
    +extends java.lang.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        DeterministicUpgradeRequiresPassword

        +
        public DeterministicUpgradeRequiresPassword()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/EncryptableKeyChain.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/EncryptableKeyChain.html new file mode 100644 index 000000000..7bdcc45bb --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/EncryptableKeyChain.html @@ -0,0 +1,403 @@ + + + + + +EncryptableKeyChain (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        toEncrypted

        +
        EncryptableKeyChain toEncrypted​(java.lang.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​(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​(java.lang.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-alpha3/org/bitcoinj/wallet/FilteringCoinSelector.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/FilteringCoinSelector.html new file mode 100644 index 000000000..41409f69b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/FilteringCoinSelector.html @@ -0,0 +1,380 @@ + + + + + +FilteringCoinSelector (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FilteringCoinSelector

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.FilteringCoinSelector
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    CoinSelector
    +
    +
    +
    public class FilteringCoinSelector
    +extends java.lang.Object
    +implements CoinSelector
    +
    A filtering coin selector delegates to another coin selector, but won't select outputs spent by the given transactions.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        select

        +
        public CoinSelection select​(Coin target,
        +                            java.util.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-alpha3/org/bitcoinj/wallet/KeyBag.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyBag.html new file mode 100644 index 000000000..461924506 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyBag.html @@ -0,0 +1,315 @@ + + + + + +KeyBag (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/wallet/KeyChain.KeyPurpose.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChain.KeyPurpose.html new file mode 100644 index 000000000..41c1530bf --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChain.KeyPurpose.html @@ -0,0 +1,406 @@ + + + + + +KeyChain.KeyPurpose (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum KeyChain.KeyPurpose

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static KeyChain.KeyPurposevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static KeyChain.KeyPurpose[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static KeyChain.KeyPurpose[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (KeyChain.KeyPurpose c : KeyChain.KeyPurpose.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static KeyChain.KeyPurpose valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChain.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChain.html new file mode 100644 index 000000000..d08676dd1 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChain.html @@ -0,0 +1,512 @@ + + + + + +KeyChain (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        hasKey

        +
        boolean hasKey​(ECKey key)
        +
        Returns true if the given key is in the chain.
        +
      • +
      + + + +
        +
      • +

        getKeys

        +
        java.util.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

        +
        java.util.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,
        +                      java.util.concurrent.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

        +
        java.time.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-alpha3/org/bitcoinj/wallet/KeyChainFactory.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChainFactory.html new file mode 100644 index 000000000..afeb583e9 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChainFactory.html @@ -0,0 +1,421 @@ + + + + + +KeyChainFactory (bitcoinj-core 0.17-SNAPSHOT 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-alpha3/org/bitcoinj/wallet/KeyChainGroup.Builder.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChainGroup.Builder.html new file mode 100644 index 000000000..61f2a8e86 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChainGroup.Builder.html @@ -0,0 +1,437 @@ + + + + + +KeyChainGroup.Builder (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class KeyChainGroup.Builder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.KeyChainGroup.Builder
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChainGroup.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChainGroup.html new file mode 100644 index 000000000..131ab01b8 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChainGroup.html @@ -0,0 +1,1719 @@ + + + + + +KeyChainGroup (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class KeyChainGroup

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.KeyChainGroup
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    KeyBag
    +
    +
    +
    public class KeyChainGroup
    +extends java.lang.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.

    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        createBasic

        +
        public static KeyChainGroup createBasic​(Network network)
        +
        Creates a keychain group with just a basic chain. No deterministic chains will be created automatically.
        +
      • +
      + + + + + + + + + + + + + + + + + + + + + + + +
        +
      • +

        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).
        +
      • +
      + + + + + + + +
        +
      • +

        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 java.util.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.
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        getActiveKeyChains

        +
        public java.util.List<DeterministicKeyChain> getActiveKeyChains​(@Nullable
        +                                                                java.time.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getActiveKeyChain

        +
        public final DeterministicKeyChain getActiveKeyChain​(ScriptType outputScriptType,
        +                                                     java.time.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

        +
        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 upgrate is + tried.
        +
      • +
      + + + +
        +
      • +

        mergeActiveKeyChains

        +
        public final void mergeActiveKeyChains​(KeyChainGroup from,
        +                                       java.time.Instant keyRotationTime)
        +
        Merge all active chains from the given keychain group into this keychain group.
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        importKeys

        +
        public int importKeys​(java.util.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​(java.lang.CharSequence password)
        +
      • +
      + + + +
        +
      • +

        checkAESKey

        +
        public boolean checkAESKey​(AesKey aesKey)
        +
      • +
      + + + +
        +
      • +

        importKeysAndEncrypt

        +
        public int importKeysAndEncrypt​(java.util.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.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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:
        +
        java.lang.IllegalArgumentException - if the key is deterministic.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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:
        +
        java.lang.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 java.util.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 java.time.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,
        +                             java.util.concurrent.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,
        +                                             java.util.concurrent.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 java.util.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)
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        upgradeToDeterministic

        +
        public void upgradeToDeterministic​(ScriptType preferredScriptType,
        +                                   KeyChainGroupStructure structure,
        +                                   @Nullable
        +                                   java.time.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:
        +
        java.lang.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.
        +
        java.lang.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.
        +
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        toString

        +
        public java.lang.String toString​(boolean includeLookahead,
        +                                 boolean includePrivateKeys,
        +                                 @Nullable
        +                                 AesKey aesKey)
        +
      • +
      + + + +
        +
      • +

        getDeterministicKeyChains

        +
        public java.util.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-alpha3/org/bitcoinj/wallet/KeyChainGroupStructure.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChainGroupStructure.html new file mode 100644 index 000000000..02c66ea85 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyChainGroupStructure.html @@ -0,0 +1,486 @@ + + + + + +KeyChainGroupStructure (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface KeyChainGroupStructure

+
+
+
+ +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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-alpha3/org/bitcoinj/wallet/KeyTimeCoinSelector.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyTimeCoinSelector.html new file mode 100644 index 000000000..5d1f0d549 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/KeyTimeCoinSelector.html @@ -0,0 +1,401 @@ + + + + + +KeyTimeCoinSelector (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class KeyTimeCoinSelector

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.KeyTimeCoinSelector
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        KeyTimeCoinSelector

        +
        public KeyTimeCoinSelector​(Wallet wallet,
        +                           java.time.Instant time,
        +                           boolean ignorePending)
        +
      • +
      + + + + +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        select

        +
        public CoinSelection select​(Coin target,
        +                            java.util.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-alpha3/org/bitcoinj/wallet/RedeemData.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/RedeemData.html new file mode 100644 index 000000000..78965824b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/RedeemData.html @@ -0,0 +1,383 @@ + + + + + +RedeemData (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class RedeemData

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.RedeemData
    • +
    +
  • +
+
+
    +
  • +
    +
    public class RedeemData
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        redeemScript

        +
        public final Script redeemScript
        +
      • +
      + + + +
        +
      • +

        keys

        +
        public final java.util.List<ECKey> keys
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/RiskAnalysis.Analyzer.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/RiskAnalysis.Analyzer.html new file mode 100644 index 000000000..9e815ae13 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/RiskAnalysis.Analyzer.html @@ -0,0 +1,260 @@ + + + + + +RiskAnalysis.Analyzer (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface RiskAnalysis.Analyzer

+
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/RiskAnalysis.Result.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/RiskAnalysis.Result.html new file mode 100644 index 000000000..fa042c4d9 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/RiskAnalysis.Result.html @@ -0,0 +1,393 @@ + + + + + +RiskAnalysis.Result (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum RiskAnalysis.Result

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      NON_FINAL 
      NON_STANDARD 
      OK 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static RiskAnalysis.ResultvalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static RiskAnalysis.Result[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static RiskAnalysis.Result[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (RiskAnalysis.Result c : RiskAnalysis.Result.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static RiskAnalysis.Result valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/RiskAnalysis.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/RiskAnalysis.html new file mode 100644 index 000000000..6fc209735 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/RiskAnalysis.html @@ -0,0 +1,288 @@ + + + + + +RiskAnalysis (bitcoinj-core 0.17-SNAPSHOT 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.

    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/SendRequest.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/SendRequest.html new file mode 100644 index 000000000..04699dd88 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/SendRequest.html @@ -0,0 +1,744 @@ + + + + + +SendRequest (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class SendRequest

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.SendRequest
    • +
    +
  • +
+
+
    +
  • +
    +
    public class SendRequest
    +extends java.lang.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 TypeFieldDescription
      AesKeyaesKey +
      The AES key to use to decrypt the private keys before signing.
      +
      AddresschangeAddress +
      "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.
      +
      CoinSelectorcoinSelector +
      If not null, the CoinSelector to use instead of the wallets default.
      +
      booleanemptyWallet +
      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).
      +
      booleanensureMinRequiredFee +
      Requires that there be enough fee for a default Bitcoin Core to at least relay the transaction.
      +
      ExchangeRateexchangeRate +
      If not null, this exchange rate is recorded with the transaction during completion.
      +
      CoinfeePerKb +
      A transaction can have a fee attached, which is defined as the difference between the input values + and output values.
      +
      java.lang.Stringmemo +
      If not null, this memo is recorded with the transaction during completion.
      +
      Wallet.MissingSigsModemissingSigsMode +
      Specifies what to do with missing signatures left after completing this request.
      +
      booleanrecipientsPayFees +
      If false (default value), tx fee is paid by the sender If true, tx fee is paid by the recipient/s.
      +
      booleanshuffleOutputs +
      If true (the default), the outputs will be shuffled during completion to randomize the location of the change + output, if any.
      +
      booleansignInputs +
      If true (the default), the inputs will be signed.
      +
      Transactiontx +
      A transaction, probably incomplete, that describes the outline of what you want to do.
      +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        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.
        +
      • +
      + + + + + + + +
        +
      • +

        exchangeRate

        +
        public ExchangeRate exchangeRate
        +
        If not null, this exchange rate is recorded with the transaction during completion.
        +
      • +
      + + + +
        +
      • +

        memo

        +
        public java.lang.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 Detail

      + + + +
        +
      • +

        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.

        +
      • +
      + + + + + + + +
        +
      • +

        forTx

        +
        public static SendRequest forTx​(Transaction tx)
        +
        Simply wraps a pre-built incomplete transaction provided by you.
        +
      • +
      + + + + + + + +
        +
      • +

        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 java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.BadPassword.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.BadPassword.html new file mode 100644 index 000000000..c8379dddd --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.BadPassword.html @@ -0,0 +1,317 @@ + + + + + +UnreadableWalletException.BadPassword (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class UnreadableWalletException.BadPassword

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BadPassword

        +
        public BadPassword()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.FutureVersion.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.FutureVersion.html new file mode 100644 index 000000000..b966fb9e7 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.FutureVersion.html @@ -0,0 +1,317 @@ + + + + + +UnreadableWalletException.FutureVersion (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class UnreadableWalletException.FutureVersion

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FutureVersion

        +
        public FutureVersion()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.WrongNetwork.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.WrongNetwork.html new file mode 100644 index 000000000..e6e49e397 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.WrongNetwork.html @@ -0,0 +1,317 @@ + + + + + +UnreadableWalletException.WrongNetwork (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class UnreadableWalletException.WrongNetwork

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        WrongNetwork

        +
        public WrongNetwork()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.html new file mode 100644 index 000000000..ebb5c747a --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/UnreadableWalletException.html @@ -0,0 +1,345 @@ + + + + + +UnreadableWalletException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class UnreadableWalletException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.bitcoinj.wallet.UnreadableWalletException
        • +
        +
      • +
      +
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    + +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        UnreadableWalletException

        +
        public UnreadableWalletException​(java.lang.String s)
        +
      • +
      + + + +
        +
      • +

        UnreadableWalletException

        +
        public UnreadableWalletException​(java.lang.String s,
        +                                 java.lang.Throwable t)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.BadWalletEncryptionKeyException.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.BadWalletEncryptionKeyException.html new file mode 100644 index 000000000..a64546724 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.BadWalletEncryptionKeyException.html @@ -0,0 +1,307 @@ + + + + + +Wallet.BadWalletEncryptionKeyException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Wallet.BadWalletEncryptionKeyException

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        BadWalletEncryptionKeyException

        +
        public BadWalletEncryptionKeyException​(java.lang.Throwable throwable)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.BalanceType.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.BalanceType.html new file mode 100644 index 000000000..62eaf1820 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.BalanceType.html @@ -0,0 +1,433 @@ + + + + + +Wallet.BalanceType (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum Wallet.BalanceType

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<Wallet.BalanceType>
    +
    +
    +
    Enclosing class:
    +
    Wallet
    +
    +
    +
    public static enum Wallet.BalanceType
    +extends java.lang.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 Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      AVAILABLE +
      Balance that could be safely used to create new spends, if we had all the needed private keys.
      +
      AVAILABLE_SPENDABLE +
      Same as AVAILABLE but only for outputs we have the private keys for and can sign ourselves.
      +
      ESTIMATED +
      Balance calculated assuming all pending transactions are in fact included into the best chain by miners.
      +
      ESTIMATED_SPENDABLE +
      Same as ESTIMATED but only for outputs we have the private keys for and can sign ourselves.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static Wallet.BalanceTypevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static Wallet.BalanceType[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        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 Detail

      + + + +
        +
      • +

        values

        +
        public static Wallet.BalanceType[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (Wallet.BalanceType c : Wallet.BalanceType.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static Wallet.BalanceType valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.CompletionException.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.CompletionException.html new file mode 100644 index 000000000..d048420cc --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.CompletionException.html @@ -0,0 +1,331 @@ + + + + + +Wallet.CompletionException (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Wallet.CompletionException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • java.lang.RuntimeException
        • +
        • +
            +
          • org.bitcoinj.wallet.Wallet.CompletionException
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        CompletionException

        +
        public CompletionException()
        +
      • +
      + + + +
        +
      • +

        CompletionException

        +
        public CompletionException​(java.lang.Throwable throwable)
        +
      • +
      + + + +
        +
      • +

        CompletionException

        +
        public CompletionException​(java.lang.String message)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.CouldNotAdjustDownwards.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.CouldNotAdjustDownwards.html new file mode 100644 index 000000000..0c912fa84 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.CouldNotAdjustDownwards.html @@ -0,0 +1,262 @@ + + + + + +Wallet.CouldNotAdjustDownwards (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Wallet.CouldNotAdjustDownwards

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.DustySendRequested.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.DustySendRequested.html new file mode 100644 index 000000000..b82907c0b --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.DustySendRequested.html @@ -0,0 +1,306 @@ + + + + + +Wallet.DustySendRequested (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Wallet.DustySendRequested

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      DustySendRequested() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        DustySendRequested

        +
        public DustySendRequested()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.ExceededMaxTransactionSize.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.ExceededMaxTransactionSize.html new file mode 100644 index 000000000..0d378a3ee --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.ExceededMaxTransactionSize.html @@ -0,0 +1,306 @@ + + + + + +Wallet.ExceededMaxTransactionSize (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Wallet.ExceededMaxTransactionSize

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        ExceededMaxTransactionSize

        +
        public ExceededMaxTransactionSize()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.MissingSigsMode.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.MissingSigsMode.html new file mode 100644 index 000000000..23ca1d206 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.MissingSigsMode.html @@ -0,0 +1,406 @@ + + + + + +Wallet.MissingSigsMode (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum Wallet.MissingSigsMode

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<Wallet.MissingSigsMode>
    +
    +
    +
    Enclosing class:
    +
    Wallet
    +
    +
    +
    public static enum Wallet.MissingSigsMode
    +extends java.lang.Enum<Wallet.MissingSigsMode>
    +
    Enumerates possible resolutions for missing signatures.
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static Wallet.MissingSigsModevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static Wallet.MissingSigsMode[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static Wallet.MissingSigsMode[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (Wallet.MissingSigsMode c : Wallet.MissingSigsMode.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static Wallet.MissingSigsMode valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.MultipleOpReturnRequested.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.MultipleOpReturnRequested.html new file mode 100644 index 000000000..f39a6f86f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.MultipleOpReturnRequested.html @@ -0,0 +1,306 @@ + + + + + +Wallet.MultipleOpReturnRequested (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Wallet.MultipleOpReturnRequested

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.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:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        MultipleOpReturnRequested

        +
        public MultipleOpReturnRequested()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.SendResult.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.SendResult.html new file mode 100644 index 000000000..517fe70c5 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.SendResult.html @@ -0,0 +1,457 @@ + + + + + +Wallet.SendResult (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Wallet.SendResult

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.Wallet.SendResult
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    Wallet
    +
    +
    +
    public static class Wallet.SendResult
    +extends java.lang.Object
    +
    A SendResult is returned to you as part of sending coins to a recipient.
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.html new file mode 100644 index 000000000..f0a8a5895 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/Wallet.html @@ -0,0 +1,6243 @@ + + + + + +Wallet (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Wallet

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        lock

        +
        protected final java.util.concurrent.locks.ReentrantLock lock
        +
      • +
      + + + +
        +
      • +

        keyChainGroupLock

        +
        protected final java.util.concurrent.locks.ReentrantLock keyChainGroupLock
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        network

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

        vFileManager

        +
        protected volatile WalletFiles vFileManager
        +
      • +
      + + + + + + + +
        +
      • +

        coinSelector

        +
        protected final CoinSelector coinSelector
        +
      • +
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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

        +
        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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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

        +
        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

        +
        public static Wallet fromSeed​(Network network,
        +                              DeterministicSeed seed,
        +                              ScriptType outputScriptType,
        +                              java.util.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.
        +
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        fromWatchingKeyB58

        +
        public static Wallet fromWatchingKeyB58​(Network network,
        +                                        java.lang.String watchKeyB58,
        +                                        java.time.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

        +
        public static Wallet fromWatchingKeyB58​(Network network,
        +                                        java.lang.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
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        fromSpendingKeyB58

        +
        public static Wallet fromSpendingKeyB58​(Network network,
        +                                        java.lang.String spendingKeyB58,
        +                                        java.time.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

        +
        public static Wallet fromSpendingKeyB58​(Network network,
        +                                        java.lang.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
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        network

        +
        public Network network()
        +
      • +
      + + + + + + + +
        +
      • +

        parseAddress

        +
        public Address parseAddress​(java.lang.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
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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 java.util.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).
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        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 java.util.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.
        +
      • +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +
      • +

        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 java.util.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 java.util.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​(java.util.List<ECKey> keys)
        +
        Imports the given keys to the wallet. + If autosaveToFile(File, long, TimeUnit, 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​(java.util.List<ECKey> keys,
        +                                java.lang.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​(java.util.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).
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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:
        +
        java.lang.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,
        +                                 java.time.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)
        +
        +
      • +
      + + + + + + + +
        +
      • +

        addWatchedAddresses

        +
        public int addWatchedAddresses​(java.util.List<Address> addresses,
        +                               java.time.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​(java.util.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        addWatchedScripts

        +
        public int addWatchedScripts​(java.util.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​(java.util.List<Address> addresses)
        +
        Removes the given output scripts from the wallet that were being watched.
        +
        +
        Returns:
        +
        true if successful
        +
        +
      • +
      + + + +
        +
      • +

        removeWatchedScripts

        +
        public boolean removeWatchedScripts​(java.util.List<Script> scripts)
        +
        Removes the given output scripts from the wallet that were being watched.
        +
        +
        Returns:
        +
        true if successful
        +
        +
      • +
      + + + +
        +
      • +

        getWatchedAddresses

        +
        public java.util.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
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getKeyByPath

        +
        public DeterministicKey getKeyByPath​(java.util.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​(java.lang.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​(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​(java.lang.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:
        +
        java.lang.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​(java.lang.CharSequence currentPassword,
        +                                     java.lang.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.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        serializeKeyChainGroupToProtobuf

        +
        @Deprecated
        +public java.util.List<org.bitcoinj.protobuf.wallet.Protos.Key> serializeKeyChainGroupToProtobuf()
        +
        Deprecated.
        +
      • +
      + + + +
        +
      • +

        saveToFile

        +
        public void saveToFile​(java.io.File tempFile,
        +                       java.io.File destFile)
        +                throws java.io.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:
        +
        java.io.FileNotFoundException - if directory doesn't exist
        +
        java.io.IOException - if an error occurs while saving
        +
        +
      • +
      + + + +
        +
      • +

        saveToFile

        +
        public void saveToFile​(java.io.File f)
        +                throws java.io.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:
        +
        java.io.FileNotFoundException - if directory doesn't exist
        +
        java.io.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.

        +
      • +
      + + + + + + + +
        +
      • +

        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).
        +
      • +
      + + + + + + + +
        +
      • +

        autosaveToFile

        +
        public WalletFiles autosaveToFile​(java.io.File f,
        +                                  java.time.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, eg 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 + delayTime. 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
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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​(java.io.OutputStream f)
        +                      throws java.io.IOException
        +
        Uses protobuf serialization to save the wallet to the given file stream. To learn more about this file format, see + WalletProtobufSerializer.
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        getParams

        +
        @Deprecated
        +public NetworkParameters getParams()
        +
        Deprecated. + +
        +
        Returns the parameters this wallet was created with.
        +
      • +
      + + + + + + + +
        +
      • +

        loadFromFile

        +
        public static Wallet loadFromFile​(java.io.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 java.lang.IllegalStateException
        +
        Variant of isConsistent() that throws an IllegalStateException describing the first + inconsistency.
        +
        +
        Throws:
        +
        java.lang.IllegalStateException
        +
        +
      • +
      + + + +
        +
      • +

        loadFromFileStream

        +
        public static Wallet loadFromFileStream​(java.io.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​(java.io.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
        +                           java.util.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
        +                                  java.util.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
        +                           java.util.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​(java.util.concurrent.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​(java.util.concurrent.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​(java.util.concurrent.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​(java.util.concurrent.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​(java.util.concurrent.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​(java.util.concurrent.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​(java.util.concurrent.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​(java.util.concurrent.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​(java.util.List<Script> scripts,
        +                                     boolean isAddingScripts)
        +
      • +
      + + + +
        +
      • +

        getTransactions

        +
        public java.util.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 java.lang.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 java.util.List<Transaction> getTransactionsByTime()
        +
        Returns all non-dead, active transactions ordered by recency.
        +
      • +
      + + + +
        +
      • +

        getRecentTransactions

        +
        public java.util.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 (eg 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.
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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.
        +
      • +
      + + + + + + + +
        +
      • +

        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.
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        getUnspents

        +
        public java.util.List<TransactionOutput> getUnspents()
        +
        Returns a copy of the internal unspent outputs list
        +
      • +
      + + + +
        +
      • +

        toString

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

        toString

        +
        public java.lang.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 java.util.Collection<Transaction> getPendingTransactions()
        +
        Returns an immutable view of the transactions currently waiting for network confirmations.
        +
      • +
      + + + +
        +
      • +

        earliestKeyCreationTime

        +
        public java.time.Instant earliestKeyCreationTime()
        +
        Returns the earliest creation time of keys or watched scripts in this wallet, ie the min + of ECKey.creationTime(). 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​(java.time.Instant time)
        +
      • +
      + + + +
        +
      • +

        clearLastBlockSeenTime

        +
        public void clearLastBlockSeenTime()
        +
      • +
      + + + + + + + +
        +
      • +

        lastBlockSeenTime

        +
        public java.util.Optional<java.time.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 java.util.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​(java.lang.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 java.lang.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,
        +                              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
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        sendCoins

        +
        public Wallet.SendResult sendCoins​(TransactionBroadcaster broadcaster,
        +                                   SendRequest request)
        +                            throws InsufficientMoneyException,
        +                                   Wallet.CompletionException
        +

        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.
        +
        java.lang.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
        +
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        waitForConfirmation

        +
        public java.util.concurrent.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 java.util.concurrent.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
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        calculateAllSpendCandidates

        +
        public java.util.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 java.util.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 java.util.List<TransactionOutput> calculateAllSpendCandidatesFromUTXOProvider​(boolean excludeImmatureCoinbases)
        +
        Returns the spendable candidates from the UTXOProvider based on keys that the wallet contains.
        +
        +
        Returns:
        +
        The list of candidates.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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,
        +                       java.util.List<StoredBlock> oldBlocks,
        +                       java.util.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
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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 java.util.Map<java.lang.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 java.lang.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:
        +
        java.lang.Exception
        +
        +
      • +
      + + + +
        +
      • +

        setTag

        +
        public void setTag​(java.lang.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
        +                               java.time.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
        +                               java.util.Date time)
        +
        Deprecated. + +
        +
      • +
      + + + +
        +
      • +

        keyRotationTime

        +
        public java.util.Optional<java.time.Instant> keyRotationTime()
        +
        Returns the key rotation time, or empty if unconfigured. See setKeyRotationTime(Instant) for a description + of the field.
        +
      • +
      + + + +
        +
      • +

        getKeyRotationTime

        +
        @Deprecated
        +@Nullable
        +public java.util.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<java.util.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<java.util.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-alpha3/org/bitcoinj/wallet/WalletExtension.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletExtension.html new file mode 100644 index 000000000..17939d6e0 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletExtension.html @@ -0,0 +1,320 @@ + + + + + +WalletExtension (bitcoinj-core 0.17-SNAPSHOT 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

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      voiddeserializeWalletExtension​(Wallet containingWallet, + byte[] data) +
      Loads the contents of this object from the wallet.
      +
      java.lang.StringgetWalletExtensionID() +
      Returns a Java package/class style name used to disambiguate this extension from others.
      +
      booleanisWalletExtensionMandatory() +
      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[]serializeWalletExtension() +
      Returns bytes that will be saved in the wallet.
      +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getWalletExtensionID

        +
        java.lang.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 java.lang.Exception
        +
        Loads the contents of this object from the wallet.
        +
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletFiles.Listener.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletFiles.Listener.html new file mode 100644 index 000000000..af6161dee --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletFiles.Listener.html @@ -0,0 +1,275 @@ + + + + + +WalletFiles.Listener (bitcoinj-core 0.17-SNAPSHOT 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

      + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      voidonAfterAutoSave​(java.io.File newlySavedFile) +
      Called on the auto-save thread after the newly created temporary file has been filled with data and renamed.
      +
      voidonBeforeAutoSave​(java.io.File tempFile) +
      Called on the auto-save thread when a new temporary file is created but before the wallet data is saved + to it.
      +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onBeforeAutoSave

        +
        void onBeforeAutoSave​(java.io.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​(java.io.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-alpha3/org/bitcoinj/wallet/WalletFiles.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletFiles.html new file mode 100644 index 000000000..dff520bc4 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletFiles.html @@ -0,0 +1,446 @@ + + + + + +WalletFiles (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class WalletFiles

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.WalletFiles
    • +
    +
  • +
+
+
    +
  • +
    +
    public class WalletFiles
    +extends java.lang.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.
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static interface WalletFiles.Listener +
      Implementors can do pre/post treatment of the wallet file.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      WalletFiles​(Wallet wallet, + java.io.File file, + long delayTime, + java.util.concurrent.TimeUnit timeUnit) + +
      WalletFiles​(Wallet wallet, + java.io.File file, + java.time.Duration delay) +
      Initialize atomic and optionally delayed writing of the wallet file to disk.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      WalletgetWallet() +
      Get the Wallet this WalletFiles is managing.
      +
      voidsaveLater() +
      Queues up a save in the background.
      +
      voidsaveNow() +
      Actually write the wallet file to disk, using an atomic rename when possible.
      +
      voidsetListener​(WalletFiles.Listener listener) +
      The given listener will be called on the autosave thread before and after the wallet is saved to disk.
      +
      voidshutdownAndWait() +
      Shut down auto-saving.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        WalletFiles

        +
        public WalletFiles​(Wallet wallet,
        +                   java.io.File file,
        +                   java.time.Duration delay)
        +
        Initialize atomic and optionally delayed writing of the wallet file to disk. Note the initial wallet state isn't + saved automatically. The Wallet calls saveNow() or saveLater() as wallet state changes, + depending on the urgency of the changes.
        +
      • +
      + + + +
        +
      • +

        WalletFiles

        +
        @Deprecated
        +public WalletFiles​(Wallet wallet,
        +                   java.io.File file,
        +                   long delayTime,
        +                   java.util.concurrent.TimeUnit timeUnit)
        + +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        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 java.io.IOException
        +
        Actually write the wallet file to disk, using an atomic rename when possible. Runs on the current thread.
        +
        +
        Throws:
        +
        java.io.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-alpha3/org/bitcoinj/wallet/WalletProtobufSerializer.WalletFactory.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletProtobufSerializer.WalletFactory.html new file mode 100644 index 000000000..34b3410e8 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletProtobufSerializer.WalletFactory.html @@ -0,0 +1,321 @@ + + + + + +WalletProtobufSerializer.WalletFactory (bitcoinj-core 0.17-SNAPSHOT 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-alpha3/org/bitcoinj/wallet/WalletProtobufSerializer.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletProtobufSerializer.html new file mode 100644 index 000000000..5aa8ce6e8 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletProtobufSerializer.html @@ -0,0 +1,819 @@ + + + + + +WalletProtobufSerializer (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class WalletProtobufSerializer

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.WalletProtobufSerializer
    • +
    +
  • +
+
+
    +
  • +
    +
    public class WalletProtobufSerializer
    +extends java.lang.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 Detail

      + + + +
        +
      • +

        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 java.util.Map<com.google.protobuf.ByteString,​Transaction> txMap
        +
      • +
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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,
        +                        java.io.OutputStream output)
        +                 throws java.io.IOException
        +
        Formats the given wallet (transactions and keys) to the given output stream in protocol buffer format.

        + + Equivalent to walletToProto(wallet).writeTo(output);

        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        walletToText

        +
        public java.lang.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​(java.io.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​(java.io.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

        +
        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).
        +
        +
      • +
      + + + + + + + +
        +
      • +

        parseToProto

        +
        public static org.bitcoinj.protobuf.wallet.Protos.Wallet parseToProto​(java.io.InputStream input)
        +                                                               throws java.io.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:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        isWallet

        +
        public static boolean isWallet​(java.io.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-alpha3/org/bitcoinj/wallet/WalletTransaction.Pool.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletTransaction.Pool.html new file mode 100644 index 000000000..d52a1dac2 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletTransaction.Pool.html @@ -0,0 +1,406 @@ + + + + + +WalletTransaction.Pool (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum WalletTransaction.Pool

+
+
+
    +
  • java.lang.Object
  • +
  • + +
  • +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      DEAD 
      PENDING 
      SPENT 
      UNSPENT 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static WalletTransaction.PoolvalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static WalletTransaction.Pool[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static WalletTransaction.Pool[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (WalletTransaction.Pool c : WalletTransaction.Pool.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static WalletTransaction.Pool valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (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:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletTransaction.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletTransaction.html new file mode 100644 index 000000000..b80fe43a5 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/WalletTransaction.html @@ -0,0 +1,344 @@ + + + + + +WalletTransaction (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class WalletTransaction

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.WalletTransaction
    • +
    +
  • +
+
+
    +
  • +
    +
    public class WalletTransaction
    +extends java.lang.Object
    +
    Stores data about a transaction that is only relevant to the Wallet class.
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/AbstractKeyChainEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/AbstractKeyChainEventListener.html new file mode 100644 index 000000000..3a99615d7 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/AbstractKeyChainEventListener.html @@ -0,0 +1,320 @@ + + + + + +AbstractKeyChainEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class AbstractKeyChainEventListener

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.bitcoinj.wallet.listeners.AbstractKeyChainEventListener
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidonKeysAdded​(java.util.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.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

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

      Constructor Detail

      + + + +
        +
      • +

        AbstractKeyChainEventListener

        +
        public AbstractKeyChainEventListener()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onKeysAdded

        +
        public void onKeysAdded​(java.util.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-alpha3/org/bitcoinj/wallet/listeners/CurrentKeyChangeEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/CurrentKeyChangeEventListener.html new file mode 100644 index 000000000..4beda013c --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/CurrentKeyChangeEventListener.html @@ -0,0 +1,251 @@ + + + + + +CurrentKeyChangeEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface CurrentKeyChangeEventListener

+
+
+
+
    +
  • +
    +
    public interface CurrentKeyChangeEventListener
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onCurrentKeyChanged

        +
        void onCurrentKeyChanged()
        +
        Called by KeyChainGroup whenever a current key and/or address changes.
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/KeyChainEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/KeyChainEventListener.html new file mode 100644 index 000000000..7a60017ab --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/KeyChainEventListener.html @@ -0,0 +1,258 @@ + + + + + +KeyChainEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface KeyChainEventListener

+
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      voidonKeysAdded​(java.util.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.
      +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onKeysAdded

        +
        void onKeysAdded​(java.util.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-alpha3/org/bitcoinj/wallet/listeners/ScriptsChangeEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/ScriptsChangeEventListener.html new file mode 100644 index 000000000..55efbf6f2 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/ScriptsChangeEventListener.html @@ -0,0 +1,265 @@ + + + + + +ScriptsChangeEventListener (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        onScriptsChanged

        +
        void onScriptsChanged​(Wallet wallet,
        +                      java.util.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-alpha3/org/bitcoinj/wallet/listeners/WalletChangeEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/WalletChangeEventListener.html new file mode 100644 index 000000000..4cbb55eb0 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/WalletChangeEventListener.html @@ -0,0 +1,272 @@ + + + + + +WalletChangeEventListener (bitcoinj-core 0.17-SNAPSHOT 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 Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.html new file mode 100644 index 000000000..ccb3f9b61 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.html @@ -0,0 +1,276 @@ + + + + + +WalletCoinsReceivedEventListener (bitcoinj-core 0.17-SNAPSHOT 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

      + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      voidonCoinsReceived​(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 Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/wallet/listeners/WalletCoinsSentEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/WalletCoinsSentEventListener.html new file mode 100644 index 000000000..0d66c2224 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/WalletCoinsSentEventListener.html @@ -0,0 +1,279 @@ + + + + + +WalletCoinsSentEventListener (bitcoinj-core 0.17-SNAPSHOT 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

      + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      voidonCoinsSent​(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 Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/wallet/listeners/WalletReorganizeEventListener.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/WalletReorganizeEventListener.html new file mode 100644 index 000000000..d7e60adf4 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/WalletReorganizeEventListener.html @@ -0,0 +1,263 @@ + + + + + +WalletReorganizeEventListener (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface WalletReorganizeEventListener

+
+
+
+
    +
  • +
    +
    All Known Implementing Classes:
    +
    NativeWalletReorganizeEventListener
    +
    +
    +
    public interface WalletReorganizeEventListener
    +

    Implementors are called when the wallet is reorganized.

    +
  • +
+
+
+
    +
  • + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        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-alpha3/org/bitcoinj/wallet/listeners/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/package-summary.html new file mode 100644 index 000000000..3dadd5e38 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/package-summary.html @@ -0,0 +1,217 @@ + + + + + +org.bitcoinj.wallet.listeners (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.wallet.listeners

+
+
+ +
+
+
+ +
+ + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/package-tree.html new file mode 100644 index 000000000..39fbf4efc --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/listeners/package-tree.html @@ -0,0 +1,173 @@ + + + + + +org.bitcoinj.wallet.listeners Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.wallet.listeners

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/org/bitcoinj/wallet/package-summary.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/package-summary.html new file mode 100644 index 000000000..d6aa5f0e8 --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/package-summary.html @@ -0,0 +1,517 @@ + + + + + +org.bitcoinj.wallet (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

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-alpha3/org/bitcoinj/wallet/package-tree.html b/javadoc/0.17-alpha3/org/bitcoinj/wallet/package-tree.html new file mode 100644 index 000000000..5dee1e49f --- /dev/null +++ b/javadoc/0.17-alpha3/org/bitcoinj/wallet/package-tree.html @@ -0,0 +1,259 @@ + + + + + +org.bitcoinj.wallet Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.wallet

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Hierarchy

+ +
+
+
+ + + diff --git a/javadoc/0.17-alpha3/overview-summary.html b/javadoc/0.17-alpha3/overview-summary.html new file mode 100644 index 000000000..1d606b1c1 --- /dev/null +++ b/javadoc/0.17-alpha3/overview-summary.html @@ -0,0 +1,23 @@ + + + + + +bitcoinj-core 0.17-SNAPSHOT API + + + + + + + +
+ +

index.html

+
+ + diff --git a/javadoc/0.17-alpha3/overview-tree.html b/javadoc/0.17-alpha3/overview-tree.html new file mode 100644 index 000000000..b9d0f1e4d --- /dev/null +++ b/javadoc/0.17-alpha3/overview-tree.html @@ -0,0 +1,767 @@ + + + + + +Class Hierarchy (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Hierarchy

+ +
+
+
+
+ +
+ + diff --git a/javadoc/0.17-alpha3/package-search-index.js b/javadoc/0.17-alpha3/package-search-index.js new file mode 100644 index 000000000..e71f6b0ea --- /dev/null +++ b/javadoc/0.17-alpha3/package-search-index.js @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"All Packages","url":"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.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"}] \ No newline at end of file diff --git a/javadoc/0.17-alpha3/package-search-index.zip b/javadoc/0.17-alpha3/package-search-index.zip new file mode 100644 index 0000000000000000000000000000000000000000..99dc872303da10d850e2d25dad85d073d60d43ed GIT binary patch literal 361 zcmWIWW@Zs#;Nak3*g9)!I0F)p1hNYfld}`kQ+10|6N{2FbTji(QY-Ybiu3bYCmH53 zIr6x!7xLvTZYbHwXuC*)Ej#(cE#=#@-*7#B*RWtggn!ij{NJx{|IS|YW#+yPyRxNm zrx>Q0WnOaMD6lm=x4Wjvvi`Tn%lyx81Z6)7?&bPqDc|krV{}Gz*5VDNE+_a-E#0i> z-zUJoRsvExf%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-alpha3/script.js b/javadoc/0.17-alpha3/script.js new file mode 100644 index 000000000..7dc93c48e --- /dev/null +++ b/javadoc/0.17-alpha3/script.js @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2013, 2018, 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, 'jquery/jszip/dist/jszip.js'); + createElem(doc, tag, 'jquery/jszip-utils/dist/jszip-utils.js'); + if (window.navigator.userAgent.indexOf('MSIE ') > 0 || window.navigator.userAgent.indexOf('Trident/') > 0 || + window.navigator.userAgent.indexOf('Edge/') > 0) { + createElem(doc, tag, 'jquery/jszip-utils/dist/jszip-utils-ie.js'); + } + createElem(doc, tag, 'search.js'); + + $.get(pathtoroot + "module-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "module-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("module-search-index.json").async("text").then(function(content){ + moduleSearchIndex = JSON.parse(content); + }); + }); + }); + }); + $.get(pathtoroot + "package-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "package-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("package-search-index.json").async("text").then(function(content){ + packageSearchIndex = JSON.parse(content); + }); + }); + }); + }); + $.get(pathtoroot + "type-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "type-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("type-search-index.json").async("text").then(function(content){ + typeSearchIndex = JSON.parse(content); + }); + }); + }); + }); + $.get(pathtoroot + "member-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "member-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("member-search-index.json").async("text").then(function(content){ + memberSearchIndex = JSON.parse(content); + }); + }); + }); + }); + $.get(pathtoroot + "tag-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "tag-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("tag-search-index.json").async("text").then(function(content){ + tagSearchIndex = JSON.parse(content); + }); + }); + }); + }); + if (!moduleSearchIndex) { + createElem(doc, tag, 'module-search-index.js'); + } + if (!packageSearchIndex) { + createElem(doc, tag, 'package-search-index.js'); + } + if (!typeSearchIndex) { + createElem(doc, tag, 'type-search-index.js'); + } + if (!memberSearchIndex) { + createElem(doc, tag, 'member-search-index.js'); + } + if (!tagSearchIndex) { + createElem(doc, tag, 'tag-search-index.js'); + } + $(window).resize(function() { + $('.navPadding').css('padding-top', $('.fixedNav').css("height")); + }); +} + +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(type) { + count = 0; + for (var key in data) { + var row = document.getElementById(key); + if ((data[key] & type) !== 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) { + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} + +function updateModuleFrame(pFrame, cFrame) { + top.packageFrame.location = pFrame; + top.classFrame.location = cFrame; +} diff --git a/javadoc/0.17-alpha3/search.js b/javadoc/0.17-alpha3/search.js new file mode 100644 index 000000000..8492271e7 --- /dev/null +++ b/javadoc/0.17-alpha3/search.js @@ -0,0 +1,326 @@ +/* + * Copyright (c) 2015, 2018, 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 catModules = "Modules"; +var catPackages = "Packages"; +var catTypes = "Types"; +var catMembers = "Members"; +var catSearchTags = "SearchTags"; +var highlight = "$&"; +var camelCaseRegexp = ""; +var secondaryMatcher = ""; +function getHighlightedText(item) { + var ccMatcher = new RegExp(camelCaseRegexp); + var label = item.replace(ccMatcher, highlight); + if (label === item) { + label = item.replace(secondaryMatcher, highlight); + } + return label; +} +function getURLPrefix(ui) { + var urlPrefix=""; + if (useModuleDirectories) { + 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.p) || ui.item.category === catMembers) { + $.each(packageSearchIndex, function(index, item) { + if (item.m && ui.item.p == item.l) { + urlPrefix = item.m + slash; + } + }); + return urlPrefix; + } else { + return urlPrefix; + } + } + return urlPrefix; +} +var watermark = 'Search'; +$(function() { + $("#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', function() { + if ($(this).val() == watermark) { + $(this).val('').removeClass('watermark'); + } + }); + $("#reset").click(function() { + $("#search").val(''); + $("#search").focus(); + }); + $("#search").focus(); + $("#search")[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, + currentCategory = ""; + rMenu.menu.bindings = $(); + $.each(items, function(index, item) { + var li; + if (item.l !== noResult.l && 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", "resultItem"); + } else { + li.attr("aria-label", item.l); + li.attr("class", "resultItem"); + } + }); + }, + _renderItem: function(ul, item) { + var label = ""; + if (item.category === catModules) { + label = getHighlightedText(item.l); + } else if (item.category === catPackages) { + label = (item.m) + ? getHighlightedText(item.m + "/" + item.l) + : getHighlightedText(item.l); + } else if (item.category === catTypes) { + label = (item.p) + ? getHighlightedText(item.p + "." + item.l) + : getHighlightedText(item.l); + } else if (item.category === catMembers) { + label = getHighlightedText(item.p + "." + (item.c + "." + item.l)); + } else if (item.category === catSearchTags) { + label = getHighlightedText(item.l); + } else { + label = item.l; + } + var li = $("
  • ").appendTo(ul); + var div = $("
    ").appendTo(li); + if (item.category === catSearchTags) { + if (item.d) { + div.html(label + " (" + item.h + ")
    " + + item.d + "
    "); + } else { + div.html(label + " (" + item.h + ")"); + } + } else { + div.html(label); + } + return li; + } +}); +$(function() { + $("#search").catcomplete({ + minLength: 1, + delay: 100, + source: function(request, response) { + var result = new Array(); + var presult = new Array(); + var tresult = new Array(); + var mresult = new Array(); + var tgresult = new Array(); + var secondaryresult = new Array(); + var displayCount = 0; + var exactMatcher = new RegExp("^" + $.ui.autocomplete.escapeRegex(request.term) + "$", "i"); + camelCaseRegexp = ($.ui.autocomplete.escapeRegex(request.term)).split(/(?=[A-Z])/).join("([a-z0-9_$]*?)"); + var camelCaseMatcher = new RegExp("^" + camelCaseRegexp); + secondaryMatcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); + + // Return the nested innermost name from the specified object + function nestedName(e) { + return e.l.substring(e.l.lastIndexOf(".") + 1); + } + + function concatResults(a1, a2) { + a1 = a1.concat(a2); + a2.length = 0; + return a1; + } + + if (moduleSearchIndex) { + var mdleCount = 0; + $.each(moduleSearchIndex, function(index, item) { + item.category = catModules; + if (exactMatcher.test(item.l)) { + result.push(item); + mdleCount++; + } else if (camelCaseMatcher.test(item.l)) { + result.push(item); + } else if (secondaryMatcher.test(item.l)) { + secondaryresult.push(item); + } + }); + displayCount = mdleCount; + result = concatResults(result, secondaryresult); + } + if (packageSearchIndex) { + var pCount = 0; + var pkg = ""; + $.each(packageSearchIndex, function(index, item) { + item.category = catPackages; + pkg = (item.m) + ? (item.m + "/" + item.l) + : item.l; + if (exactMatcher.test(item.l)) { + presult.push(item); + pCount++; + } else if (camelCaseMatcher.test(pkg)) { + presult.push(item); + } else if (secondaryMatcher.test(pkg)) { + secondaryresult.push(item); + } + }); + result = result.concat(concatResults(presult, secondaryresult)); + displayCount = (pCount > displayCount) ? pCount : displayCount; + } + if (typeSearchIndex) { + var tCount = 0; + $.each(typeSearchIndex, function(index, item) { + item.category = catTypes; + var s = nestedName(item); + if (exactMatcher.test(s)) { + tresult.push(item); + tCount++; + } else if (camelCaseMatcher.test(s)) { + tresult.push(item); + } else if (secondaryMatcher.test(item.p + "." + item.l)) { + secondaryresult.push(item); + } + }); + result = result.concat(concatResults(tresult, secondaryresult)); + displayCount = (tCount > displayCount) ? tCount : displayCount; + } + if (memberSearchIndex) { + var mCount = 0; + $.each(memberSearchIndex, function(index, item) { + item.category = catMembers; + var s = nestedName(item); + if (exactMatcher.test(s)) { + mresult.push(item); + mCount++; + } else if (camelCaseMatcher.test(s)) { + mresult.push(item); + } else if (secondaryMatcher.test(item.c + "." + item.l)) { + secondaryresult.push(item); + } + }); + result = result.concat(concatResults(mresult, secondaryresult)); + displayCount = (mCount > displayCount) ? mCount : displayCount; + } + if (tagSearchIndex) { + var tgCount = 0; + $.each(tagSearchIndex, function(index, item) { + item.category = catSearchTags; + if (exactMatcher.test(item.l)) { + tgresult.push(item); + tgCount++; + } else if (secondaryMatcher.test(item.l)) { + secondaryresult.push(item); + } + }); + result = result.concat(concatResults(tgresult, secondaryresult)); + displayCount = (tgCount > displayCount) ? tgCount : displayCount; + } + displayCount = (displayCount > 500) ? displayCount : 500; + var counter = function() { + var count = {Modules: 0, Packages: 0, Types: 0, Members: 0, SearchTags: 0}; + var f = function(item) { + count[item.category] += 1; + return (count[item.category] <= displayCount); + }; + return f; + }(); + response(result.filter(counter)); + }, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push(noResult); + } else { + $("#search").empty(); + } + }, + autoFocus: true, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.l !== noResult.l) { + var url = getURLPrefix(ui); + if (ui.item.category === catModules) { + if (useModuleDirectories) { + url += "module-summary.html"; + } else { + url = ui.item.l + "-summary.html"; + } + } else if (ui.item.category === catPackages) { + if (ui.item.url) { + url = ui.item.url; + } else { + url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (ui.item.category === catTypes) { + if (ui.item.url) { + url = ui.item.url; + } else if (ui.item.p === "") { + 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 === "") { + url += ui.item.c + ".html" + "#"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; + } + if (ui.item.url) { + url += ui.item.url; + } 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").focus(); + } + } + }); +}); diff --git a/javadoc/0.17-alpha3/serialized-form.html b/javadoc/0.17-alpha3/serialized-form.html new file mode 100644 index 000000000..99b0203ee --- /dev/null +++ b/javadoc/0.17-alpha3/serialized-form.html @@ -0,0 +1,731 @@ + + + + + +Serialized Form (bitcoinj-core 0.17-SNAPSHOT API) + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Serialized Form

    +
    +
    + +
    +
    +
    + +
    + + diff --git a/javadoc/0.17-alpha3/stylesheet.css b/javadoc/0.17-alpha3/stylesheet.css new file mode 100644 index 000000000..de945eda2 --- /dev/null +++ b/javadoc/0.17-alpha3/stylesheet.css @@ -0,0 +1,910 @@ +/* + * 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; +} +a[name]:before, a[name]:target, a[id]:before, a[id]:target { + content:""; + display:inline-block; + position:relative; + padding-top:129px; + margin-top:-129px; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + 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; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} + +/* + * 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:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* + * Styles for navigation bar. + */ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.navPadding { + padding-top: 107px; +} +.fixedNav { + position:fixed; + width:100%; + z-index:999; + background-color:#ffffff; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.navListSearch { + float:right; + margin:0 0 0 0; + padding:0; +} +ul.navListSearch li { + list-style:none; + float:right; + padding: 5px 6px; + text-transform:uppercase; +} +ul.navListSearch li label { + position:relative; + right:-16px; +} +ul.subNavList li { + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* + * Styles for page header and footer. + */ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexNav { + position:relative; + font-size:12px; + background-color:#dee3e9; +} +.indexNav ul { + margin-top:0; + padding:5px; +} +.indexNav ul li { + display:inline; + list-style-type:none; + padding-right:10px; + text-transform:uppercase; +} +.indexNav h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* + * Styles for headings. + */ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* + * Styles for page layout containers. + */ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer, +.allClassesContainer, .allPackagesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue 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; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* + * Styles for tables. + */ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary, +.requiresSummary, .packagesSummary, .providesSummary, .usesSummary { + width:100%; + border-spacing:0; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary, .requiresSummary, .packagesSummary, .providesSummary, .usesSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption, +.requiresSummary caption, .packagesSummary caption, .providesSummary caption, .usesSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.constantsSummary caption a:link, .constantsSummary caption a:visited, +.useSummary caption a:link, .useSummary caption a:visited { + color:#1f389c; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.deprecatedSummary caption a:link, +.requiresSummary caption a:link, .packagesSummary caption a:link, .providesSummary caption a:link, +.usesSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.requiresSummary caption a:hover, .packagesSummary caption a:hover, .providesSummary caption a:hover, +.usesSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.requiresSummary caption a:active, .packagesSummary caption a:active, .providesSummary caption a:active, +.usesSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.deprecatedSummary caption a:visited, +.requiresSummary caption a:visited, .packagesSummary caption a:visited, .providesSummary caption a:visited, +.usesSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span, +.requiresSummary caption span, .packagesSummary caption span, .providesSummary caption span, +.usesSummary 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; +} +.memberSummary caption span.activeTableTab span, .packagesSummary caption span.activeTableTab span, +.overviewSummary caption span.activeTableTab span, .typeSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span, .packagesSummary caption span.tableTab span, +.overviewSummary caption span.tableTab span, .typeSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab, +.packagesSummary caption span.tableTab, .packagesSummary caption span.activeTableTab, +.overviewSummary caption span.tableTab, .overviewSummary caption span.activeTableTab, +.typeSummary caption span.tableTab, .typeSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd, +.requiresSummary .tabEnd, .packagesSummary .tabEnd, .providesSummary .tabEnd, .usesSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd, .packagesSummary .activeTableTab .tabEnd, +.overviewSummary .activeTableTab .tabEnd, .typeSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd, .packagesSummary .tableTab .tabEnd, +.overviewSummary .tableTab .tabEnd, .typeSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; +} +.rowColor th, .altColor th { + font-weight:normal; +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td, +.requiresSummary td, .packagesSummary td, .providesSummary td, .usesSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colFirst, th.colSecond, th.colLast, th.colConstructorName, th.colDeprecatedItemName, .useSummary th, +.constantsSummary th, .packagesSummary th, td.colFirst, td.colSecond, td.colLast, .useSummary td, +.constantsSummary td { + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colSecond, th.colLast, th.colConstructorName, th.colDeprecatedItemName, .constantsSummary th, +.packagesSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + font-size:13px; +} +td.colSecond, th.colSecond, td.colLast, th.colConstructorName, th.colDeprecatedItemName, th.colLast { + font-size:13px; +} +.constantsSummary th, .packagesSummary th { + font-size:13px; +} +.providesSummary th.colFirst, .providesSummary th.colLast, .providesSummary td.colFirst, +.providesSummary td.colLast { + white-space:normal; + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.requiresSummary td.colFirst, .requiresSummary th.colFirst, +.packagesSummary td.colFirst, .packagesSummary td.colSecond, .packagesSummary th.colFirst, .packagesSummary th, +.usesSummary td.colFirst, .usesSummary th.colFirst, +.providesSummary td.colFirst, .providesSummary th.colFirst, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colSecond, .memberSummary th.colSecond, .memberSummary th.colConstructorName, +.typeSummary td.colFirst, .typeSummary th.colFirst { + vertical-align:top; +} +.packagesSummary th.colLast, .packagesSummary td.colLast { + white-space:normal; +} +td.colFirst a:link, td.colFirst a:visited, +td.colSecond a:link, td.colSecond a:visited, +th.colFirst a:link, th.colFirst a:visited, +th.colSecond a:link, th.colSecond a:visited, +th.colConstructorName a:link, th.colConstructorName a:visited, +th.colDeprecatedItemName a:link, th.colDeprecatedItemName a:visited, +.constantValuesContainer td a:link, .constantValuesContainer td a:visited, +.allClassesContainer td a:link, .allClassesContainer td a:visited, +.allPackagesContainer td a:link, .allPackagesContainer td a:visited { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor, .altColor th { + background-color:#FFFFFF; +} +.rowColor, .rowColor th { + background-color:#EEEEEF; +} +/* + * Styles for contents. + */ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +td.colLast div { + padding-top:0px; +} +td.colLast a { + padding-bottom:3px; +} +/* + * Styles for formatting effect. + */ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .implementationLabel, .memberNameLabel, .memberNameLink, +.moduleLabelInPackage, .moduleLabelInType, .overrideSpecifyLabel, .packageLabelInType, +.packageHierarchyLabel, .paramLabel, .returnLabel, .seeLabel, .simpleTagLabel, +.throwsLabel, .typeNameLabel, .typeNameLink, .searchTagLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} +.deprecationBlock { + 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.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} +div.contentContainer ul.blockList li.blockList h2 { + padding-bottom:0px; +} +/* + * Styles for IFRAME. + */ +.mainContainer { + margin:0 auto; + padding:0; + height:100%; + width:100%; + position:fixed; + top:0; + left:0; +} +.leftContainer { + height:100%; + position:fixed; + width:320px; +} +.leftTop { + position:relative; + float:left; + width:315px; + top:0; + left:0; + height:30%; + border-right:6px solid #ccc; + border-bottom:6px solid #ccc; +} +.leftBottom { + position:relative; + float:left; + width:315px; + bottom:0; + left:0; + height:70%; + border-right:6px solid #ccc; + border-top:1px solid #000; +} +.rightContainer { + position:absolute; + left:320px; + top:0; + bottom:0; + height:100%; + right:0; + border-left:1px solid #000; +} +.rightIframe { + margin:0; + padding:0; + height:100%; + right:30px; + width:100%; + overflow:visible; + margin-bottom:30px; +} +/* + * 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; +} +.resultItem { + 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%; +} +.resultHighlight { + font-weight:bold; +} +.ui-autocomplete .result-item { + font-size: inherit; +} +#search { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + padding-left:20px; + position:relative; + right:-18px; +} +#reset { + 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:17px; + position:relative; + left:-4px; + top:-4px; + font-size:0px; +} +.watermark { + color:#545454; +} +.searchTagDescResult { + font-style:italic; + font-size:11px; +} +.searchTagHolderResult { + font-style:italic; + font-size:12px; +} +.searchTagResult:before, .searchTagResult:target { + color:red; +} +.moduleGraph span { + display:none; + position:absolute; +} +.moduleGraph:hover span { + display:block; + margin: -100px 0 0 100px; + z-index: 1; +} +.methodSignature { + white-space:normal; +} + +/* + * 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; +} diff --git a/javadoc/0.17-alpha3/type-search-index.js b/javadoc/0.17-alpha3/type-search-index.js new file mode 100644 index 000000000..0978ea1a5 --- /dev/null +++ b/javadoc/0.17-alpha3/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","url":"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.crypto.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"}] \ No newline at end of file diff --git a/javadoc/0.17-alpha3/type-search-index.zip b/javadoc/0.17-alpha3/type-search-index.zip new file mode 100644 index 0000000000000000000000000000000000000000..cd2992b40aff941db7e701c3c086f7e1f07e9310 GIT binary patch literal 3413 zcmZvfXEYm*8i&)y2qH#Mv}(`R2(>9ydnRa8v1e^+)@YGZ#A=nsjM_1Z7)5JV?NzIk z3Z>L4p)`tc|M%0q_niB@AKu?NzxTY~AGi^aiVXk)fdEZ8nMlBY!SPQH3iEfB40Lr2 zaCVpU@O5#0Eae&K=i6js6u8>La(+X+K(Ttq*u?WyuB4UMLkc`Gz5QOrH3!yonKA$k zm5;}}gQY1x{lpBC`v9>gS*Nm-2BdJpNI6YQI#?;VqE(ZArA)T_m@EWMw>t|$bWw(} zh6d>sRa!2!#qy44D^VI&e0wEgctiU8;zJeHsmq-cw!n_3#Wssg+99TSm4c)^A3T1B z@q5^JtxR*Vmx)D&hV=_we2d_+^?>=O1vYNAArR@3d5s{P5$axuO1o0|xCe7W|5T4q zQ0{~|tUHYa~gnXxG^57p9$W;*uD~fnYlONJw3Qg zPyBQ>DQkIZoG6Y0*q;GfZ)9%pHC~?Z2IUSH9S`IA?&%yQRg`wnqVuz@qg>U>7hK*d z#Q8yks*|+Zq#uhMrw=lY>S?A=qTLLYa1_qlz?dsnv+U)e7_mMi=v$VQfi0e^%1&BY zJcJ$C{h9Y^%j-x$TGtGQJ>swAFbv@`;_^FE_0y#NqG{*3Z01gi82xyb&C5voVVfG^ z1cU8TI{RLgdtF5>+l{1P>y&*jQ8ONvmu@Mq$FPBw^CepQc44$9dM;PQu%=HNT zczf%|n_@lcXW4y-B`Cz2o1dCHSX7n_>>_%C;|dF2AXS#^W~%3EyEA0QmHu2o1WU&_ z+1)Ko70FXj6mZ`cIHo#v9CT2RZYd|riyl{^lloEWQg>ov7il#U8Qc8gB3O8QCL`@K zS_6|~;0C(bP$yS4^`CHH!jP1gF!-|0ZAa^z{?8HmSEDi?Wr-^Rc}nc0ni7`7MBjpo zu5ogD^(YO@b+hU$s}9tfPnYsOe4-#@hBaqR`&)O1W7J}mJcF-YFxM%;5Um**iVM14 z{5Up|!^R?+k(YkyN0cj5D++JYm_|$6PjCsdqi5Ys8fIB{X@VXsnWlXqnO@%-HF{9N zeFSRw(U@Hu`U2-MJN74g=2BjwKb6IHQW6Wq@5ZP3*3ORoc#Uns8IX$}HloGWy&+@)CMKpvj4z8sy>RS6 zlTeiib8c<$2#g=+(BCmBuipX3{w2RR4?pdMW`8);ZFrcPIf`%HMkuBlkKkXkzDu7- z<$J>E+H)UB^CnWEo!Tt7wx>!_BuMb_4ko1{vE!J&EK)~6YiYpbbCF5|i(Jnu{i}s% z>#Sc0`vIu&M%Tbd-fm9^aX-%ECRuA|tvzRGM9sa_-qH-G%lnty5H&*8{mJLeZnExc zb&(QLb^tIuy+H!%$EIDl)>pNE{>2JUC3VP3HFs=tOu+N!m>CV_qk7hTf>LSR>oQGW zc1zJqJ$KdDL(Rm-oBKx*YDne4&E3XTym7O!Y%tVv^4te2XTp2pjrnC)#L2k@x{hzTa zK2+TYH2X#2pia-a6yRxhHj$9{%+85lEM6p>3o`wI~=c`O# zxk!#lEEMGo)CWfzX=+-IWHw}7d~X2PTW$34t-|Tpcir<{4xZ3;3_pbi9xtQ6J)7$+ zcPA$z01o^PJ5>43dI&jY*}xeZ`??uc+=7+IjJoS$s--jy;lzy+DNIFm*r_qjcADvO z8XRYtBpHxDjgqFxA9N^MBzee5b&FCmC2T9ZUk68jb16heLqE{M-`X&D?E0%QVzO|9 z-)Yuomw<|^Fds`LfpzW`&Ccs@#6D$+ArDoAz$G#&DkBZo2ZDXIX8oX0(c7rlB8a(6WUA*`XiwjN=CyF$mrLf(MPpM9tD?l*at}ChI@r?Jl z-ge(7?dpviX03GrCTrigE)~ehwLjVwvv1XwBFer?rs(7ZwuZMiHnhH5YTn&)3L*a_ zT|hZIWt*k{u+*G$yH~$35w@-WB|6UP)fRni4%8ZW+NZEpcVlfzcd#=Wl1u3mHj;sz zC90>muM!~7&1%5)$ArU*^x)^o#}N7hH6QLc!`#yi68rh${Zkonkt0HFZdbgAq!Ge# za#XY0CwNW=(q|c}eL51D@QTk^4p*V7xvg=`^Ox}9dYCL#&8{feuW#GOP>vZqg@Qtw zlasx$%_iyFX?+Xo!0J`Yxc!_ncJ83+YQZWAfNFjn#P+^%GqF(O68Dc8-=16bHFj49 zZr1mv1-Vn6V*AuRP`4s~aZx~9IA2ZSUbafc%e-N({huqCslUXemN3XCH0s2iTl>8n z)g^}IE#0;GCV&&R2&xHHu`69{s6>mMz38HMZz?3^4Vd)%6|5#Xg#yOig)u5ZY43uj zWAxVOexEWt8V^>Fb*1(By103E!ns=Ck5fL57xA{CjDJ76=`!$%@fC_(w=Ko6mI96h z6`(h)xOhw@Rsv9_^$t9((*8|D2wO24-4#L}g4yM|e#n9+BTtf~+M_ppr2NoDd!{#Q zOB?)aKbkrEm7MAINFeD?>|c4E1@Z=*@#4kE4f=H$(G#hWWOj|=_x$+NbPmYUJ-Hl2 z%QFw&eSd>XkqYr#)B+#7cRrQQ?~JViZROi?BiraEo_(0Eq7E1QL++4bdhc}6ad*PW ziQbp#kU}3)yE)ra)3<4rr2TsWxeGXP$mGrHI=a3~*S>fQ818?AI2Kiaei-Y;V}^ml zYRF}=ISDyG_pO%nhzkWs^A~D@_wb=XOOVq!;~X}qZqk`SIgN}5${M60nSerb$?%^! zpAeFD(BJ5Kn_IU+69IqCbe(FVwVA)Wcxb+xw1aYTJ@byGsoinzV}Lp zms)X^@^P!aqNDDSc;kIEG;nRu`Wle-V;nZS8_$yai+S3?w!g*zHWu7S&K2r_xRYOw zHo!pv3xr84+s~pR^kz7v9gcBNe4#07lCw2>oo!(62qC5d-!y-mf?XA}%LOCt4J#Ycl8-)6OJSxv42(+`X*smFCJ9!c7$ zGm18B@Zr855o6Ak2=IA!moKr2}#u_CnlXZ za%+)%5Q|oCT0jSHE(G$n0&mFRsZ_d8pT zw0}ryJ<%4DOp784!cvrcvHh$RYFJN&he6;uWL{kSyh#daTx9}g{fN2|%QyWNt>?Tk8I&_J2|Ew})}jc7sZ7{p357yxKM003~K nOPARI|B;{n?*1)5|I7bZA-EAW&A;z1{WIGC?9+dK0|5U5kMnj? literal 0 HcmV?d00001 diff --git a/pre-release-notes.md b/pre-release-notes.md index c80d62c4a..81de2bd06 100644 --- a/pre-release-notes.md +++ b/pre-release-notes.md @@ -16,6 +16,44 @@ title: "Pre-release notes" These versions are not yet released. For official releases, see the release notes. +## Version 0.17 alpha 3 + +See the preliminary API documentation. + +New feature: + +* reproducible reference build, see `build.Containerfile` +* OpenJDK 21 is now supported +* Gradle up to 8.5 is now supported +* WalletTool: new `--filter` option for setting type of filter used +* BlockImporter: support signet and regtest + +Bugfix: + +* PBKDF2SHA512: set hLen to correct value of 64 +* some symbols removed in previous alphas have been re-added as deprecated + +Breaking changes: + +* various fields have been made private in our quest to make more classes immutable +* protobuf: + * moved protobufs to `org.bitcoinj.protobuf.*` packages + * changed class generation into `build` directory, not under version control +* CoinSelector: new static constructor `fromPredicate()` +* TransactionInput/TransactionOutput/TransactionWitness/PartialMerkleTree: rename method `messageSize()` from `getMessageSize()` +* BlockLocator: migrate from native to static constructor `ofBlocks()` +* BlockFileLoader: + * cannot be used directly as `Iterator` any more, call `.iterator()` first + * added `.stream()` and `.streamBuffers()` to stream blocks +* FilteringCoinSelector: require list of `TransactionOutPoint` to be passed to the constructor +* PeerGroup, FilterMerger: deprecate setting false-positive rate +* TorUtils: new utility for Tor/Onion addresses + +Feature removals: + +* ECKey: remove native interface to `libsecp256k1` +* WalletTool: removed validation mode option + ## Version 0.17 alpha 2 See the preliminary API documentation.