Convert slices - requires some machinery to call Release, but otherwise not bad
[ldk-java] / src / main / java / org / ldk / structs / CommitmentSigned.java
index 1ac5af6085fcffd7e85358a52d5ae303bf4df8be..cb7870de4fa5ef80925a6fbc26f4b4a5cb837c6a 100644 (file)
@@ -26,10 +26,22 @@ public class CommitmentSigned extends CommonBase {
                this.ptrs_to.add(this_ptr);
        }
 
-       // Skipped CommitmentSigned_get_signature
-       // Skipped CommitmentSigned_set_signature
+       public byte[] get_signature(CommitmentSigned this_ptr) {
+               byte[] ret = bindings.CommitmentSigned_get_signature(this_ptr.ptr & ~1);
+               this.ptrs_to.add(this_ptr);
+               return ret;
+       }
+
+       public void set_signature(CommitmentSigned this_ptr, byte[] val) {
+               bindings.CommitmentSigned_set_signature(this_ptr.ptr & ~1, val);
+               this.ptrs_to.add(this_ptr);
+       }
+
        // Skipped CommitmentSigned_set_htlc_signatures
        // Skipped CommitmentSigned_new
        // Skipped CommitmentSigned_write
-       // Skipped CommitmentSigned_read
+       public CommitmentSigned(byte[] ser) {
+               super(bindings.CommitmentSigned_read(ser));
+       }
+
 }