public static BigInteger extractExpiryFromCltvPaymentChannel(Script script) {
        return Script.castToBigInteger(script.chunks.get(4).data, 5, false);
    }
public static BigInteger extractExpiryFromCltvPaymentChannel ( Script script ) { return Script . castToBigInteger ( script . chunks . get ( 4 ) . data , 5 , false ) ; }
Retrieves the locktime from a LOCKTIMEVERIFY transaction. It's important that the script is in the correct form,
so you will want to guard calls to this method with {@link #isSentToCltvPaymentChannel(Script)}.