Package org.bitcoinj.core
Class TransactionWitness
java.lang.Object
org.bitcoinj.core.TransactionWitness
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
bitcoinSerializeToStream
(OutputStream stream) boolean
byte[]
getPush
(int i) int
int
hashCode()
static TransactionWitness
redeemP2WPKH
(TransactionSignature signature, ECKey pubKey) Creates the stack pushes necessary to redeem a P2WPKH output.static TransactionWitness
redeemP2WSH
(Script witnessScript, TransactionSignature... signatures) Creates the stack pushes necessary to redeem a P2WSH output.void
setPush
(int i, byte[] value) toString()
-
Field Details
-
EMPTY
-
-
Constructor Details
-
TransactionWitness
public TransactionWitness(int pushCount)
-
-
Method Details
-
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. -
redeemP2WSH
public static TransactionWitness redeemP2WSH(Script witnessScript, TransactionSignature... signatures) Creates the stack pushes necessary to redeem a P2WSH output. -
getPush
public byte[] getPush(int i) -
getPushCount
public int getPushCount() -
setPush
public void setPush(int i, byte[] value) -
bitcoinSerializeToStream
- Throws:
IOException
-
toString
-
equals
-
hashCode
public int hashCode()
-