public static RedeemData of(ECKey key,Script program){
  checkArgument(program.isSentToAddress() || program.isSentToRawPubKey());
  return key != null ? new RedeemData(Collections.singletonList(key),program) : null;
}

public static RedeemData of ( ECKey key , Script program ) { checkArgument ( program . isSentToAddress ( ) || program . isSentToRawPubKey ( ) ) ; return key != null ? new RedeemData ( Collections . singletonList ( key ) , program ) : null ; }
creates redeemdata for pay - to - address or pay - to - pubkey input . provided key is a single private key needed to spend such inputs and provided program should be a proper checksig program .
