Package org.bitcoinj.core
Interface TransactionBag
-
- All Known Implementing Classes:
Wallet
public interface TransactionBag
This interface is used to abstract theWallet
and theTransaction
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<Sha256Hash,Transaction>
getTransactionPool(WalletTransaction.Pool pool)
Returns transactions from a specific pool.boolean
isPayToScriptHashMine(byte[] payToScriptHash)
Returns true if this wallet knows the script corresponding to the given hash.boolean
isPubKeyHashMine(byte[] pubKeyHash, ScriptType scriptType)
Look for a public key which hashes to the given hash and (optionally) is used for a specific script type.boolean
isPubKeyMine(byte[] pubKey)
Returns true if this wallet contains a keypair with the given public key.boolean
isWatchedScript(Script script)
Returns true if this wallet is watching transactions for outputs with the script.
-
-
-
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 forscriptType
- only look for given usage (currentlyScriptType.P2PKH
orScriptType.P2WPKH
) ornull
if we don't care- Returns:
- true if hash was found
-
isWatchedScript
boolean isWatchedScript(Script script)
Returns true if this wallet is watching transactions for outputs with the script.
-
isPubKeyMine
boolean isPubKeyMine(byte[] pubKey)
Returns true if this wallet contains a keypair with the given public key.
-
isPayToScriptHashMine
boolean isPayToScriptHashMine(byte[] payToScriptHash)
Returns true if this wallet knows the script corresponding to the given hash.
-
getTransactionPool
java.util.Map<Sha256Hash,Transaction> getTransactionPool(WalletTransaction.Pool pool)
Returns transactions from a specific pool.
-
-