+ /**
+ * Creates a copy of the TxCreationKeys
+ */
+ public TxCreationKeys clone() {
+ long ret = bindings.TxCreationKeys_clone(this.ptr);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TxCreationKeys ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new TxCreationKeys(null, ret); }
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Serialize the TxCreationKeys object into a byte array which can be read by TxCreationKeys_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.TxCreationKeys_write(this.ptr);
+ return ret;
+ }
+
+ /**
+ * Read a TxCreationKeys from a byte array, created by TxCreationKeys_write
+ */
+ public static Result_TxCreationKeysDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.TxCreationKeys_read(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Create per-state keys from channel base points and the per-commitment point.
+ * Key set is asymmetric and can't be used as part of counter-signatory set of transactions.
+ */
+ public static Result_TxCreationKeysErrorZ derive_new(byte[] per_commitment_point, byte[] broadcaster_delayed_payment_base, byte[] broadcaster_htlc_base, byte[] countersignatory_revocation_base, byte[] countersignatory_htlc_base) {
+ long ret = bindings.TxCreationKeys_derive_new(InternalUtils.check_arr_len(per_commitment_point, 33), InternalUtils.check_arr_len(broadcaster_delayed_payment_base, 33), InternalUtils.check_arr_len(broadcaster_htlc_base, 33), InternalUtils.check_arr_len(countersignatory_revocation_base, 33), InternalUtils.check_arr_len(countersignatory_htlc_base, 33));
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;