if (ptr != 0) { bindings.TaggedHash_free(ptr); }
}
+ internal long clone_ptr() {
+ long ret = bindings.TaggedHash_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the TaggedHash
+ */
+ public TaggedHash clone() {
+ long ret = bindings.TaggedHash_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.TaggedHash ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TaggedHash(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Returns the digest to sign.
+ */
+ public byte[] as_digest() {
+ long ret = bindings.TaggedHash_as_digest(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ * Returns the tag used in the tagged hash.
+ */
+ public string tag() {
+ long ret = bindings.TaggedHash_tag(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ string ret_conv = InternalUtils.decodeString(ret);
+ return ret_conv;
+ }
+
+ /**
+ * Returns the merkle root used in the tagged hash.
+ */
+ public byte[] merkle_root() {
+ long ret = bindings.TaggedHash_merkle_root(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
}
} } }