Package | Description |
---|---|
com.google.bitcoin.core | |
com.google.bitcoin.jni | |
com.google.bitcoin.script |
Modifier and Type | Method and Description |
---|---|
Script |
TransactionOutput.getScriptPubKey() |
Script |
TransactionInput.getScriptSig()
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.
|
Modifier and Type | Method and Description |
---|---|
List<Script> |
Wallet.getWatchedScripts()
Returns a snapshot of the watched scripts.
|
Modifier and Type | Method and Description |
---|---|
TransactionOutput |
Transaction.addOutput(BigInteger value,
Script script)
Creates an output that pays to the given script.
|
TransactionInput |
Transaction.addSignedInput(TransactionOutPoint prevOut,
Script scriptPubKey,
ECKey sigKey)
Same as
Transaction.addSignedInput(TransactionOutPoint, com.google.bitcoin.script.Script, ECKey, com.google.bitcoin.core.Transaction.SigHash, boolean)
but defaults to Transaction.SigHash.ALL and "false" for the anyoneCanPay flag. |
TransactionInput |
Transaction.addSignedInput(TransactionOutPoint prevOut,
Script scriptPubKey,
ECKey sigKey,
Transaction.SigHash sigHash,
boolean anyoneCanPay)
Adds a new and fully signed input for the given parameters.
|
TransactionSignature |
Transaction.calculateSignature(int inputIndex,
ECKey key,
Script connectedPubKeyScript,
Transaction.SigHash hashType,
boolean anyoneCanPay)
Calculates a signature that is valid for being inserted into the input at the given position.
|
static Address |
Address.fromP2SHScript(NetworkParameters params,
Script scriptPubKey)
Returns an Address that represents the script hash extracted from the given scriptPubKey
|
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.
|
boolean |
Wallet.isWatchedScript(Script script)
Returns true if this wallet is watching transactions for outputs with the script.
|
void |
TransactionInput.setScriptSig(Script scriptSig)
Set the given program as the scriptSig that is supposed to satisfy the connected output script.
|
Modifier and Type | Method and Description |
---|---|
int |
Wallet.addWatchedScripts(List<Script> scripts)
Adds the given output scripts to the wallet to be watched.
|
void |
WalletEventListener.onScriptsAdded(Wallet wallet,
List<Script> scripts)
Called whenever a new watched script is added to the wallet.
|
void |
AbstractWalletEventListener.onScriptsAdded(Wallet wallet,
List<Script> scripts) |
Modifier and Type | Method and Description |
---|---|
void |
NativeWalletEventListener.onScriptsAdded(Wallet wallet,
List<Script> scripts) |
Modifier and Type | Method and Description |
---|---|
Script |
ScriptBuilder.build() |
static Script |
ScriptBuilder.createInputScript(TransactionSignature signature)
Creates a scriptSig that can redeem a pay-to-pubkey output.
|
static Script |
ScriptBuilder.createInputScript(TransactionSignature signature,
ECKey pubKey)
Creates a scriptSig that can redeem a pay-to-address output.
|
static Script |
ScriptBuilder.createMultiSigInputScript(List<TransactionSignature> signatures)
Create a program that satisfies an OP_CHECKMULTISIG program.
|
static Script |
ScriptBuilder.createMultiSigInputScript(TransactionSignature... signatures)
Create a program that satisfies an OP_CHECKMULTISIG program.
|
static Script |
ScriptBuilder.createMultiSigInputScriptBytes(List<byte[]> signatures)
Create a program that satisfies an OP_CHECKMULTISIG program, using pre-encoded signatures.
|
static Script |
ScriptBuilder.createMultiSigOutputScript(int threshold,
List<ECKey> pubkeys)
Creates a program that requires at least N of the given keys to sign, using OP_CHECKMULTISIG.
|
static Script |
ScriptBuilder.createOutputScript(Address to)
Creates a scriptPubKey that encodes payment to the given address.
|
static Script |
ScriptBuilder.createOutputScript(ECKey key)
Creates a scriptPubKey that encodes payment to the given raw public key.
|
static Script |
ScriptBuilder.createP2SHOutputScript(byte[] hash)
Creates a scriptPubKey that sends to the given script hash.
|
Modifier and Type | Method and Description |
---|---|
void |
Script.correctlySpends(Transaction txContainingThis,
long scriptSigIndex,
Script scriptPubKey,
boolean enforceP2SH)
Verifies that this script (interpreted as a scriptSig) correctly spends the given scriptPubKey.
|
Copyright © 2014. All rights reserved.