Package | Description |
---|---|
com.google.bitcoin.core | |
com.google.bitcoin.jni | |
com.google.bitcoin.protocols.channels | |
com.google.bitcoin.store |
Modifier and Type | Field and Description |
---|---|
protected Sha256Hash |
CheckpointManager.dataHash |
Sha256Hash |
InventoryItem.hash |
protected Sha256Hash |
GetBlocksMessage.stopHash |
static Sha256Hash |
Sha256Hash.ZERO_HASH |
Modifier and Type | Field and Description |
---|---|
protected Map<Integer,Sha256Hash> |
NetworkParameters.checkpoints |
protected List<Sha256Hash> |
GetBlocksMessage.locator |
Modifier and Type | Method and Description |
---|---|
static Sha256Hash |
Sha256Hash.create(byte[] contents)
Calculates the (one-time) hash of contents and returns it as a new wrapped hash.
|
static Sha256Hash |
Sha256Hash.createDouble(byte[] contents)
Calculates the hash of the hash of the contents.
|
Sha256Hash |
Sha256Hash.duplicate() |
Sha256Hash |
CheckpointManager.getDataHash()
Returns a hash of the concatenated checkpoint data.
|
Sha256Hash |
TransactionOutPoint.getHash()
Returns the hash of the transaction this outpoint references/spends/is connected to.
|
Sha256Hash |
Transaction.getHash()
Returns the transaction hash as you see them in the block explorer.
|
Sha256Hash |
StoredUndoableBlock.getHash()
Get the hash of the represented block
|
Sha256Hash |
StoredTransactionOutput.getHash()
The hash of the transaction which holds this output
|
Sha256Hash |
PrunedException.getHash() |
Sha256Hash |
Message.getHash()
This method is a NOP for all classes except Block and Transaction.
|
Sha256Hash |
FilteredBlock.getHash()
Gets the hash of the block represented in this Filtered Block
|
Sha256Hash |
Block.getHash()
Returns the hash of the block (which for a valid, solved block should be
below the target).
|
Sha256Hash |
Wallet.getLastBlockSeenHash()
Returns the hash of the last seen best-chain block, or null if the wallet is too old to store this data.
|
Sha256Hash |
Block.getMerkleRoot()
Returns the merkle root in big endian form, calculating it from transactions if necessary.
|
Sha256Hash |
Block.getPrevBlockHash()
Returns the hash of the previous block in the chain, as defined by the block header.
|
Sha256Hash |
GetBlocksMessage.getStopHash() |
Sha256Hash |
PartialMerkleTree.getTxnHashAndMerkleRoot(List<Sha256Hash> matchedHashes)
Extracts tx hashes that are in this merkle tree
and returns the merkle root of this tree.
|
static Sha256Hash |
Sha256Hash.hashFileContents(File f)
Returns a hash of the given files contents.
|
Sha256Hash |
Transaction.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
|
Sha256Hash |
Transaction.hashForSignature(int inputIndex,
byte[] connectedScript,
Transaction.SigHash type,
boolean anyoneCanPay)
Calculates a signature hash, that is, a hash of a simplified form of the transaction.
|
Sha256Hash |
Transaction.hashForSignature(int inputIndex,
Script connectedScript,
Transaction.SigHash type,
boolean anyoneCanPay)
Calculates a signature hash, that is, a hash of a simplified form of the transaction.
|
Modifier and Type | Method and Description |
---|---|
Map<Sha256Hash,Integer> |
Transaction.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.
|
Map<Sha256Hash,Transaction> |
FilteredBlock.getAssociatedTransactions()
Gets the set of transactions which were provided using provideTransaction() which match in getTransactionHashes()
|
List<Sha256Hash> |
GetBlocksMessage.getLocator() |
List<Sha256Hash> |
FilteredBlock.getTransactionHashes()
Gets a list of leaf hashes which are contained in the partial merkle tree in this filtered block
|
Modifier and Type | Method and Description |
---|---|
void |
GetDataMessage.addBlock(Sha256Hash hash) |
void |
Transaction.addBlockAppearance(Sha256Hash blockHash,
int relativityOffset) |
void |
GetDataMessage.addTransaction(Sha256Hash hash) |
Transaction |
MemoryPool.get(Sha256Hash hash)
Returns the
Transaction for the given hash if we have downloaded it, or null if that hash is unknown or
we only saw advertisements for it yet or it has been downloaded but garbage collected due to nowhere else
holding a reference to it. |
com.google.common.util.concurrent.ListenableFuture<Block> |
Peer.getBlock(Sha256Hash blockHash)
Asks the connected peer for the block of the given hash, and returns a future representing the answer.
|
Block |
AbstractBlockChain.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).
|
com.google.common.util.concurrent.ListenableFuture<Transaction> |
Peer.getPeerMempoolTransaction(Sha256Hash hash)
Asks the connected peer for the given transaction from its memory pool.
|
protected StoredBlock |
FullPrunedBlockChain.getStoredBlockInCurrentScope(Sha256Hash hash) |
protected StoredBlock |
BlockChain.getStoredBlockInCurrentScope(Sha256Hash hash) |
protected abstract StoredBlock |
AbstractBlockChain.getStoredBlockInCurrentScope(Sha256Hash hash)
For a standard BlockChain, this should return blockStore.get(hash),
for a FullPrunedBlockChain blockStore.getOnceUndoableStoredBlock(hash)
|
Transaction |
Wallet.getTransaction(Sha256Hash hash)
Returns a transaction object given its hash, if it exists in this wallet, or null otherwise.
|
boolean |
AbstractBlockChain.isOrphan(Sha256Hash block)
Returns true if the given block is currently in the orphan blocks list.
|
boolean |
MemoryPool.maybeWasSeen(Sha256Hash hash)
Returns true if the TX identified by hash has been seen before (ie, in an inv).
|
void |
Wallet.notifyTransactionIsInBlock(Sha256Hash txHash,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset)
Called by the
BlockChain when we receive a new filtered block that contains a transactions previously
received by a call to @{link receivePending}. |
void |
BlockChainListener.notifyTransactionIsInBlock(Sha256Hash txHash,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset)
Called by the
BlockChain when we receive a new FilteredBlock that contains the given
transaction hash in its merkle tree. |
void |
AbstractBlockChainListener.notifyTransactionIsInBlock(Sha256Hash txHash,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset) |
int |
MemoryPool.numBroadcastPeers(Sha256Hash txHash)
Returns the number of peers that have seen the given hash recently.
|
boolean |
NetworkParameters.passesCheckpoint(int height,
Sha256Hash hash)
Returns true if the block height is either not a checkpoint, or is a checkpoint and the hash matches.
|
static ECKey |
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.
|
void |
MemoryPool.seen(Sha256Hash hash,
PeerAddress byPeer)
Called by peers when they see a transaction advertised in an "inv" message.
|
void |
Wallet.setLastBlockSeenHash(Sha256Hash lastBlockSeenHash) |
ECKey.ECDSASignature |
ECKey.sign(Sha256Hash input)
Signs the given hash and returns the R and S components as BigIntegers.
|
ECKey.ECDSASignature |
ECKey.sign(Sha256Hash input,
org.spongycastle.crypto.params.KeyParameter aesKey)
Signs the given hash and returns the R and S components as BigIntegers.
|
boolean |
ECKey.verify(Sha256Hash sigHash,
ECKey.ECDSASignature signature)
Verifies the given R/S pair (signature) against a hash using the public key.
|
Modifier and Type | Method and Description |
---|---|
TransactionInput.ConnectionResult |
TransactionInput.connect(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.
|
Sha256Hash |
PartialMerkleTree.getTxnHashAndMerkleRoot(List<Sha256Hash> matchedHashes)
Extracts tx hashes that are in this merkle tree
and returns the merkle root of this tree.
|
Constructor and Description |
---|
Block(NetworkParameters params,
long version,
Sha256Hash prevBlockHash,
Sha256Hash merkleRoot,
long time,
long difficultyTarget,
long nonce,
List<Transaction> transactions)
Construct a block initialized with all the given fields.
|
GetBlocksMessage(NetworkParameters params,
List<Sha256Hash> locator,
Sha256Hash stopHash) |
GetHeadersMessage(NetworkParameters params,
List<Sha256Hash> locator,
Sha256Hash stopHash) |
InventoryItem(InventoryItem.Type type,
Sha256Hash hash) |
PrunedException(Sha256Hash hash) |
StoredTransactionOutput(Sha256Hash hash,
long index,
BigInteger value,
int height,
boolean isCoinbase,
byte[] scriptBytes)
Creates a stored transaction output
|
StoredTransactionOutput(Sha256Hash hash,
TransactionOutput out,
int height,
boolean isCoinbase) |
StoredUndoableBlock(Sha256Hash hash,
List<Transaction> transactions) |
StoredUndoableBlock(Sha256Hash hash,
TransactionOutputChanges txOutChanges) |
Transaction(NetworkParameters params,
int version,
Sha256Hash hash) |
TransactionOutPoint(NetworkParameters params,
long index,
Sha256Hash hash) |
Constructor and Description |
---|
GetBlocksMessage(NetworkParameters params,
List<Sha256Hash> locator,
Sha256Hash stopHash) |
GetHeadersMessage(NetworkParameters params,
List<Sha256Hash> locator,
Sha256Hash stopHash) |
Modifier and Type | Method and Description |
---|---|
void |
NativePaymentChannelServerConnectionEventHandler.channelOpen(Sha256Hash channelId) |
void |
NativeBlockChainListener.notifyTransactionIsInBlock(Sha256Hash txHash,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset) |
Modifier and Type | Method and Description |
---|---|
abstract void |
ServerConnectionEventHandler.channelOpen(Sha256Hash channelId)
Triggered when the channel is opened and application messages/payments can begin
|
void |
PaymentChannelServer.ServerConnection.channelOpen(Sha256Hash contractHash)
Triggered when the channel is opened and payments can begin
|
BigInteger |
StoredPaymentChannelClientStates.getBalanceForServer(Sha256Hash id)
Returns the outstanding amount of money sent back to us for all channels to this server added together.
|
StoredServerChannel |
StoredPaymentChannelServerStates.getChannel(Sha256Hash id)
Gets the
StoredServerChannel with the given channel id (ie contract transaction hash). |
long |
StoredPaymentChannelClientStates.getSecondsUntilExpiry(Sha256Hash id)
Returns the number of seconds from now until this servers next channel will expire, or zero if no unexpired
channels found.
|
void |
PaymentChannelClientState.storeChannelInWallet(Sha256Hash id)
Stores this channel's state in the wallet as a part of a
StoredPaymentChannelClientStates wallet
extension and keeps it up-to-date each time payment is incremented. |
Constructor and Description |
---|
PaymentChannelClient(Wallet wallet,
ECKey myKey,
BigInteger maxValue,
Sha256Hash serverId,
IPaymentChannelClient.ClientConnection conn)
Constructs a new channel manager which waits for
PaymentChannelClient.connectionOpen() before acting. |
Modifier and Type | Field and Description |
---|---|
protected LinkedHashMap<Sha256Hash,StoredBlock> |
SPVBlockStore.blockCache |
protected LinkedHashMap<Sha256Hash,Object> |
SPVBlockStore.notFoundCache |
Modifier and Type | Method and Description |
---|---|
static Sha256Hash |
WalletProtobufSerializer.byteStringToHash(com.google.protobuf.ByteString bs) |
Modifier and Type | Method and Description |
---|---|
StoredBlock |
SPVBlockStore.get(Sha256Hash hash) |
StoredBlock |
PostgresFullPrunedBlockStore.get(Sha256Hash hash) |
StoredBlock |
MemoryFullPrunedBlockStore.get(Sha256Hash hash) |
StoredBlock |
MemoryBlockStore.get(Sha256Hash hash) |
StoredBlock |
H2FullPrunedBlockStore.get(Sha256Hash hash) |
StoredBlock |
BlockStore.get(Sha256Hash hash)
Returns the StoredBlock given a hash.
|
StoredBlock |
PostgresFullPrunedBlockStore.get(Sha256Hash hash,
boolean wasUndoableOnly) |
StoredBlock |
H2FullPrunedBlockStore.get(Sha256Hash hash,
boolean wasUndoableOnly) |
StoredBlock |
PostgresFullPrunedBlockStore.getOnceUndoableStoredBlock(Sha256Hash hash) |
StoredBlock |
MemoryFullPrunedBlockStore.getOnceUndoableStoredBlock(Sha256Hash hash) |
StoredBlock |
H2FullPrunedBlockStore.getOnceUndoableStoredBlock(Sha256Hash hash) |
StoredBlock |
FullPrunedBlockStore.getOnceUndoableStoredBlock(Sha256Hash hash)
Returns the StoredBlock that was added as a StoredUndoableBlock given a hash.
|
StoredTransactionOutput |
PostgresFullPrunedBlockStore.getTransactionOutput(Sha256Hash hash,
long index) |
StoredTransactionOutput |
MemoryFullPrunedBlockStore.getTransactionOutput(Sha256Hash hash,
long index) |
StoredTransactionOutput |
H2FullPrunedBlockStore.getTransactionOutput(Sha256Hash hash,
long index) |
StoredTransactionOutput |
FullPrunedBlockStore.getTransactionOutput(Sha256Hash hash,
long index)
Gets a
StoredTransactionOutput with the given hash and index, or null if none is found |
StoredUndoableBlock |
PostgresFullPrunedBlockStore.getUndoBlock(Sha256Hash hash) |
StoredUndoableBlock |
MemoryFullPrunedBlockStore.getUndoBlock(Sha256Hash hash) |
StoredUndoableBlock |
H2FullPrunedBlockStore.getUndoBlock(Sha256Hash hash) |
StoredUndoableBlock |
FullPrunedBlockStore.getUndoBlock(Sha256Hash hash)
Returns a
StoredUndoableBlock whose block.getHash() method will be equal to the parameter. |
static com.google.protobuf.ByteString |
WalletProtobufSerializer.hashToByteString(Sha256Hash hash) |
boolean |
PostgresFullPrunedBlockStore.hasUnspentOutputs(Sha256Hash hash,
int numOutputs) |
boolean |
MemoryFullPrunedBlockStore.hasUnspentOutputs(Sha256Hash hash,
int numOutputs) |
boolean |
H2FullPrunedBlockStore.hasUnspentOutputs(Sha256Hash hash,
int numOutputs) |
boolean |
FullPrunedBlockStore.hasUnspentOutputs(Sha256Hash hash,
int numOutputs)
True if this store has any unspent outputs from a transaction with a hash equal to the first parameter
|
Copyright © 2014. All rights reserved.