- public static WatchedOutput of(byte[] block_hash_arg, OutPoint outpoint_arg, byte[] script_pubkey_arg) {
- long ret = bindings.WatchedOutput_new(block_hash_arg, outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, script_pubkey_arg);
- if (ret < 1024) { return null; }
- WatchedOutput ret_hu_conv = new WatchedOutput(null, ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
- ret_hu_conv.ptrs_to.add(outpoint_arg);
+ public static WatchedOutput of(org.ldk.structs.Option_ThirtyTwoBytesZ block_hash_arg, org.ldk.structs.OutPoint outpoint_arg, byte[] script_pubkey_arg) {
+ long ret = bindings.WatchedOutput_new(block_hash_arg.ptr, outpoint_arg == null ? 0 : outpoint_arg.ptr, script_pubkey_arg);
+ Reference.reachabilityFence(block_hash_arg);
+ Reference.reachabilityFence(outpoint_arg);
+ Reference.reachabilityFence(script_pubkey_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.WatchedOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.WatchedOutput(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(block_hash_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outpoint_arg); };