Class RedeemData


  • public class RedeemData
    extends java.lang.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 Detail

      • redeemScript

        public final Script redeemScript
      • keys

        public final java.util.List<ECKey> keys
    • Method Detail

      • 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:
        toString in class java.lang.Object