+ /**
+ * Proof that the sender knows the per-commitment secret of a specific commitment transaction
+ * belonging to the recipient
+ */
+ public get_your_last_per_commitment_secret(): Uint8Array {
+ const ret: number = bindings.ChannelReestablish_get_your_last_per_commitment_secret(this.ptr);
+ const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ * Proof that the sender knows the per-commitment secret of a specific commitment transaction
+ * belonging to the recipient
+ */
+ public set_your_last_per_commitment_secret(val: Uint8Array): void {
+ bindings.ChannelReestablish_set_your_last_per_commitment_secret(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32)));
+ }
+
+ /**
+ * The sender's per-commitment point for their current commitment transaction
+ */
+ public get_my_current_per_commitment_point(): Uint8Array {
+ const ret: number = bindings.ChannelReestablish_get_my_current_per_commitment_point(this.ptr);
+ const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ * The sender's per-commitment point for their current commitment transaction
+ */
+ public set_my_current_per_commitment_point(val: Uint8Array): void {
+ bindings.ChannelReestablish_set_my_current_per_commitment_point(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33)));
+ }
+
+ /**
+ * The next funding transaction ID
+ */
+ public get_next_funding_txid(): Option_TxidZ {
+ const ret: bigint = bindings.ChannelReestablish_get_next_funding_txid(this.ptr);
+ const ret_hu_conv: Option_TxidZ = Option_TxidZ.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * The next funding transaction ID
+ */
+ public set_next_funding_txid(val: Option_TxidZ): void {
+ bindings.ChannelReestablish_set_next_funding_txid(this.ptr, CommonBase.get_ptr_of(val));
+ CommonBase.add_ref_from(this, val);
+ }
+
+ /**
+ * Constructs a new ChannelReestablish given each field
+ */
+ public static constructor_new(channel_id_arg: Uint8Array, next_local_commitment_number_arg: bigint, next_remote_commitment_number_arg: bigint, your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array, next_funding_txid_arg: Option_TxidZ): ChannelReestablish {
+ const ret: bigint = bindings.ChannelReestablish_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), next_local_commitment_number_arg, next_remote_commitment_number_arg, bindings.encodeUint8Array(bindings.check_arr_len(your_last_per_commitment_secret_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(my_current_per_commitment_point_arg, 33)), CommonBase.get_ptr_of(next_funding_txid_arg));
+ const ret_hu_conv: ChannelReestablish = new ChannelReestablish(null, ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ CommonBase.add_ref_from(ret_hu_conv, next_funding_txid_arg);
+ return ret_hu_conv;
+ }
+