Class RedeemData

java.lang.Object
org.bitcoinj.wallet.RedeemData

public class RedeemData extends Object
This 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 Details

    • redeemScript

      public final Script redeemScript
    • keys

      public final List<ECKey> keys
  • Method Details

    • of

      public static RedeemData of(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 String toString()
      Overrides:
      toString in class Object