Package org.bitcoinj.core
Class TransactionWitness
- java.lang.Object
-
- org.bitcoinj.core.TransactionWitness
-
public class TransactionWitness extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static TransactionWitness
EMPTY
-
Constructor Summary
Constructors Constructor Description TransactionWitness(int pushCount)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
bitcoinSerializeToStream(java.io.OutputStream stream)
boolean
equals(java.lang.Object o)
protected int
getMessageSize()
byte[]
getPush(int i)
int
getPushCount()
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)
java.lang.String
toString()
-
-
-
Field Detail
-
EMPTY
public static final TransactionWitness EMPTY
-
-
Method Detail
-
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)
-
getMessageSize
protected int getMessageSize()
-
bitcoinSerializeToStream
protected void bitcoinSerializeToStream(java.io.OutputStream stream) throws java.io.IOException
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-