Package org.bitcoinj.wallet
Class RedeemData
- java.lang.Object
-
- org.bitcoinj.wallet.RedeemData
-
public class RedeemData extends java.lang.ObjectThis class aggregates data required to spend transaction output. For P2PKH and P2PK transactions it will have only a single key and CHECKSIG program as redeemScript. For multisignature transactions there will be multiple keys one of which will be a full key and the rest are watch only, redeem script will be a CHECKMULTISIG program. Keys will be sorted in the same order they appear in a program (lexicographical order).
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<ECKey>keysScriptredeemScript
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ECKeygetFullKey()Returns the first key that has private bytesstatic RedeemDataof(java.util.List<ECKey> keys, Script redeemScript)static RedeemDataof(ECKey key, Script redeemScript)Creates RedeemData for P2PKH, P2WPKH or P2PK input.java.lang.StringtoString()
-
-
-
Method Detail
-
of
public static RedeemData of(java.util.List<ECKey> keys, Script redeemScript)
-
of
public static RedeemData of(ECKey key, Script redeemScript)
Creates RedeemData for P2PKH, P2WPKH or P2PK input. Provided key is a single private key needed to spend such inputs.
-
getFullKey
public ECKey getFullKey()
Returns the first key that has private bytes
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-