* The genesis hash of the blockchain where the channel is to be opened
*/
public void set_chain_hash(byte[] val) {
- bindings.OpenChannel_set_chain_hash(this.ptr, val);
+ bindings.OpenChannel_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
}
/**
* A temporary channel ID, until the funding outpoint is announced
*/
public void set_temporary_channel_id(byte[] val) {
- bindings.OpenChannel_set_temporary_channel_id(this.ptr, val);
+ bindings.OpenChannel_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
}
/**
* The sender's key controlling the funding transaction
*/
public void set_funding_pubkey(byte[] val) {
- bindings.OpenChannel_set_funding_pubkey(this.ptr, val);
+ bindings.OpenChannel_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
}
/**
* Used to derive a revocation key for transactions broadcast by counterparty
*/
public void set_revocation_basepoint(byte[] val) {
- bindings.OpenChannel_set_revocation_basepoint(this.ptr, val);
+ bindings.OpenChannel_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
}
/**
* A payment key to sender for transactions broadcast by counterparty
*/
public void set_payment_point(byte[] val) {
- bindings.OpenChannel_set_payment_point(this.ptr, val);
+ bindings.OpenChannel_set_payment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
}
/**
* Used to derive a payment key to sender for transactions broadcast by sender
*/
public void set_delayed_payment_basepoint(byte[] val) {
- bindings.OpenChannel_set_delayed_payment_basepoint(this.ptr, val);
+ bindings.OpenChannel_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
}
/**
* Used to derive an HTLC payment key to sender
*/
public void set_htlc_basepoint(byte[] val) {
- bindings.OpenChannel_set_htlc_basepoint(this.ptr, val);
+ bindings.OpenChannel_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
}
/**
* The first to-be-broadcast-by-sender transaction's per commitment point
*/
public void set_first_per_commitment_point(byte[] val) {
- bindings.OpenChannel_set_first_per_commitment_point(this.ptr, val);
+ bindings.OpenChannel_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
}
/**
bindings.OpenChannel_set_channel_flags(this.ptr, val);
}
+ long clone_ptr() {
+ long ret = bindings.OpenChannel_clone_ptr(this.ptr);
+ return ret;
+ }
+
/**
* Creates a copy of the OpenChannel
*/