[C#] Add initial hooks, the C# code compiles, the C not at all
[ldk-java] / c_sharp / src / org / ldk / util / WitnessVersion.cs
diff --git a/c_sharp/src/org/ldk/util/WitnessVersion.cs b/c_sharp/src/org/ldk/util/WitnessVersion.cs
new file mode 100644 (file)
index 0000000..77a2a7d
--- /dev/null
@@ -0,0 +1,25 @@
+using System;
+
+namespace org { namespace ldk { namespace 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 ArgumentException();
+               }
+               this.val = val;
+       }
+
+       /**
+        * @return the value represented
+        */
+       public byte getVal() {
+               return val;
+       }
+}
+
+} } }