All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ldk.util.WitnessVersion Maven / Gradle / Ivy

There is a newer version: 0.0.124.0
Show newest version
package org.ldk.util;

/**
 * A 4-bit unsigned integer representing a Bitcoin SegWit version
 */
public class WitnessVersion {
    byte val;
    public WitnessVersion(byte val) {
        if (val > 16 || val < 0) {
            throw new IllegalArgumentException();
        }
        this.val = val;
    }

    /**
     * @return the value represented
     */
    public byte getVal() {
        return val;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy