Convert slices - requires some machinery to call Release, but otherwise not bad
[ldk-java] / src / main / java / org / ldk / structs / Shutdown.java
index 599ffcf64a0cd26b491c4f06b23009741d9080c7..09f1d36f208bcc661777987ab65a7b268f1dd115 100644 (file)
@@ -26,9 +26,17 @@ public class Shutdown extends CommonBase {
                this.ptrs_to.add(this_ptr);
        }
 
-       // Skipped Shutdown_get_scriptpubkey
+       public byte[] get_scriptpubkey(Shutdown this_ptr) {
+               byte[] ret = bindings.Shutdown_get_scriptpubkey(this_ptr.ptr & ~1);
+               this.ptrs_to.add(this_ptr);
+               return ret;
+       }
+
        // Skipped Shutdown_set_scriptpubkey
        // Skipped Shutdown_new
        // Skipped Shutdown_write
-       // Skipped Shutdown_read
+       public Shutdown(byte[] ser) {
+               super(bindings.Shutdown_read(ser));
+       }
+
 }