Package | Description |
---|---|
org.bitcoinj.core |
The core package contains classes for network messages like
Block and
Transaction , peer connectivity via PeerGroup ,
block chain management and the Wallet class. |
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.store |
Block stores persist blockchain data downloaded from remote peers.
|
org.bitcoinj.testing |
Various utilities for writing unit tests: also useful for testing your own code and apps that build on top of
bitcoinj.
|
org.bitcoinj.uri |
Parsing and handling of bitcoin: textual URIs as found in qr codes and web links.
|
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. |
Modifier and Type | Field and Description |
---|---|
Address |
Wallet.SendRequest.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.
|
Modifier and Type | Method and Description |
---|---|
Address |
Wallet.currentAddress(KeyChain.KeyPurpose purpose)
Returns address for a
Wallet.currentKey(org.bitcoinj.wallet.KeyChain.KeyPurpose) |
Address |
Wallet.currentReceiveAddress()
An alias for calling
Wallet.currentAddress(org.bitcoinj.wallet.KeyChain.KeyPurpose) with
KeyChain.KeyPurpose.RECEIVE_FUNDS as the parameter. |
Address |
Wallet.freshAddress(KeyChain.KeyPurpose purpose)
Returns address for a
Wallet.freshKey(org.bitcoinj.wallet.KeyChain.KeyPurpose) |
Address |
Wallet.freshReceiveAddress()
An alias for calling
Wallet.freshAddress(org.bitcoinj.wallet.KeyChain.KeyPurpose) with
KeyChain.KeyPurpose.RECEIVE_FUNDS as the parameter. |
static Address |
Address.fromP2SHHash(NetworkParameters params,
byte[] hash160)
Returns an Address that represents the given P2SH script hash.
|
static Address |
Address.fromP2SHScript(NetworkParameters params,
Script scriptPubKey)
Returns an Address that represents the script hash extracted from the given scriptPubKey
|
Address |
TransactionOutput.getAddressFromP2PKHScript(NetworkParameters networkParameters)
If the output script pays to an address as in
P2PKH, return the address of the receiver, i.e., a base58 encoded hash of the public key in the script.
|
Address |
TransactionOutput.getAddressFromP2SH(NetworkParameters networkParameters)
If the output script pays to a redeem script, return the address of the redeem script as described by,
i.e., a base58 encoding of [one-byte version][20-byte hash][4-byte checksum], where the 20-byte hash refers to
the redeem script.
|
Address |
Wallet.getChangeAddress()
Returns the address used for change outputs.
|
Address |
TransactionInput.getFromAddress()
Deprecated.
|
Address |
ECKey.toAddress(NetworkParameters params)
Returns the address that corresponds to the public part of this ECKey.
|
Modifier and Type | Method and Description |
---|---|
List<Address> |
Wallet.getWatchedAddresses()
Returns all addresses watched by this wallet.
|
Modifier and Type | Method and Description |
---|---|
TransactionOutput |
Transaction.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.
|
boolean |
Wallet.addWatchedAddress(Address address)
Same as
Wallet.addWatchedAddress(Address, long) with the current time as the creation time. |
boolean |
Wallet.addWatchedAddress(Address address,
long creationTime)
Adds the given address to the wallet to be watched.
|
Block |
Block.createNextBlock(Address to) |
Block |
Block.createNextBlock(Address to,
Coin value) |
Block |
Block.createNextBlock(Address to,
long time)
Returns a solved block that builds on top of this one.
|
Block |
Block.createNextBlock(Address to,
TransactionOutPoint prevOut) |
Transaction |
Wallet.createSend(Address address,
Coin value)
Statelessly creates a transaction that sends the given value to address.
|
static Wallet.SendRequest |
Wallet.SendRequest.emptyWallet(Address destination) |
boolean |
Wallet.isAddressWatched(Address address)
Return true if we are watching this address.
|
Wallet.SendResult |
Wallet.sendCoins(TransactionBroadcaster broadcaster,
Address to,
Coin value)
Sends coins to the given address, via the given
PeerGroup . |
static Wallet.SendRequest |
Wallet.SendRequest.to(Address destination,
Coin value)
Creates a new SendRequest to the given address for the given value.
|
Modifier and Type | Method and Description |
---|---|
int |
Wallet.addWatchedAddresses(List<Address> addresses,
long creationTime)
Adds the given address to the wallet to be watched.
|
Constructor and Description |
---|
TransactionOutput(NetworkParameters params,
Transaction parent,
Coin value,
Address to)
Creates an output that sends 'value' to the given address (public key hash).
|
Modifier and Type | Method and Description |
---|---|
static Protos.Payment |
PaymentProtocol.createPaymentMessage(List<Transaction> transactions,
Coin refundAmount,
Address refundAddress,
String memo,
byte[] merchantData)
Create a payment message with one standard pay to address output.
|
static Protos.PaymentRequest.Builder |
PaymentProtocol.createPaymentRequest(NetworkParameters params,
Coin amount,
Address toAddress,
String memo,
String paymentUrl,
byte[] merchantData)
Create a payment request with one standard pay to address output.
|
static Protos.Output |
PaymentProtocol.createPayToAddressOutput(Coin amount,
Address address)
Create a standard pay to address output for usage in
PaymentProtocol.createPaymentRequest(org.bitcoinj.core.NetworkParameters, org.bitcoinj.core.Coin, org.bitcoinj.core.Address, java.lang.String, java.lang.String, byte[]) and
PaymentProtocol.createPaymentMessage(java.util.List<org.bitcoinj.core.Transaction>, org.bitcoinj.core.Coin, org.bitcoinj.core.Address, java.lang.String, byte[]) . |
Protos.Payment |
PaymentSession.getPayment(List<Transaction> txns,
Address refundAddr,
String memo)
Generates a Payment message based on the information in the PaymentRequest.
|
ListenableFuture<PaymentProtocol.Ack> |
PaymentSession.sendPayment(List<Transaction> txns,
Address refundAddr,
String memo)
Generates a Payment message and sends the payment to the merchant who sent the PaymentRequest.
|
Modifier and Type | Method and Description |
---|---|
Address |
Script.getFromAddress(NetworkParameters params)
Deprecated.
|
Address |
Script.getToAddress(NetworkParameters params)
Gets the destination address from this script, if it's in the required form (see getPubKey).
|
Address |
Script.getToAddress(NetworkParameters params,
boolean forcePayToPubKey)
Gets the destination address from this script, if it's in the required form (see getPubKey).
|
Modifier and Type | Method and Description |
---|---|
static Script |
ScriptBuilder.createOutputScript(Address to)
Creates a scriptPubKey that encodes payment to the given address.
|
Modifier and Type | Method and Description |
---|---|
BigInteger |
PostgresFullPrunedBlockStore.calculateBalanceForAddress(Address address)
Calculate the balance for a coinbase, to-address, or p2sh address.
|
Modifier and Type | Field and Description |
---|---|
protected Address |
TestWithNetworkConnections.address |
protected Address |
TestWithWallet.myAddress |
Modifier and Type | Method and Description |
---|---|
static FakeTxBuilder.DoubleSpends |
FakeTxBuilder.createFakeDoubleSpendTxns(NetworkParameters params,
Address to)
Creates two transactions that spend the same (fake) output.
|
static Transaction |
FakeTxBuilder.createFakeTx(NetworkParameters params,
Coin value,
Address to)
Create a fake TX of sufficient realism to exercise the unit tests.
|
static Transaction[] |
FakeTxBuilder.createFakeTx(NetworkParameters params,
Coin value,
Address to,
Address from)
Transaction[0] is a feeder transaction, supplying BTC to Transaction[1]
|
static Transaction |
FakeTxBuilder.createFakeTxWithChangeAddress(NetworkParameters params,
Coin value,
Address to,
Address changeOutput)
Create a fake TX of sufficient realism to exercise the unit tests.
|
static Block |
FakeTxBuilder.makeSolvedTestBlock(Block prev,
Address to,
Transaction... transactions) |
static Block |
FakeTxBuilder.makeSolvedTestBlock(BlockStore blockStore,
Address coinsTo) |
protected Transaction |
TestWithWallet.sendMoneyToWallet(Wallet wallet,
Coin value,
Address toAddress,
AbstractBlockChain.NewBlockType type) |
Modifier and Type | Method and Description |
---|---|
Address |
BitcoinURI.getAddress()
The Bitcoin Address from the URI, if one was present.
|
Modifier and Type | Method and Description |
---|---|
static String |
BitcoinURI.convertToBitcoinURI(Address address,
Coin amount,
String label,
String message) |
Modifier and Type | Method and Description |
---|---|
Address |
KeyChainGroup.currentAddress(KeyChain.KeyPurpose purpose)
Returns address for a
KeyChainGroup.currentKey(KeyChain.KeyPurpose) |
Address |
KeyChainGroup.freshAddress(KeyChain.KeyPurpose purpose)
Returns address for a
KeyChainGroup.freshKey(KeyChain.KeyPurpose) |
Copyright © 2014. All rights reserved.