* Handle an incoming `closing_signed` message from the given peer.
*/
void handle_closing_signed(byte[] their_node_id, ClosingSigned msg);
+ /**
+ * Handle an incoming `stfu` message from the given peer.
+ */
+ void handle_stfu(byte[] their_node_id, Stfu msg);
+ /**
+ * Handle an incoming `splice` message from the given peer.
+ */
+ void handle_splice(byte[] their_node_id, Splice msg);
+ /**
+ * Handle an incoming `splice_ack` message from the given peer.
+ */
+ void handle_splice_ack(byte[] their_node_id, SpliceAck msg);
+ /**
+ * Handle an incoming `splice_locked` message from the given peer.
+ */
+ void handle_splice_locked(byte[] their_node_id, SpliceLocked msg);
/**
* Handle an incoming `tx_add_input message` from the given peer.
*/
*/
InitFeatures provided_init_features(byte[] their_node_id);
/**
- * Gets the genesis hashes for this `ChannelMessageHandler` indicating which chains it supports.
+ * Gets the chain hashes for this `ChannelMessageHandler` indicating which chains it supports.
*
* If it's `None`, then no particular network chain hash compatibility will be enforced when
* connecting to peers.
*/
- Option_CVec_ThirtyTwoBytesZZ get_genesis_hashes();
+ Option_CVec_ThirtyTwoBytesZZ get_chain_hashes();
}
private static class LDKChannelMessageHandlerHolder { ChannelMessageHandler held; }
public static ChannelMessageHandler new_impl(ChannelMessageHandlerInterface arg, MessageSendEventsProvider.MessageSendEventsProviderInterface MessageSendEventsProvider_impl) {
arg.handle_closing_signed(their_node_id, msg_hu_conv);
Reference.reachabilityFence(arg);
}
+ @Override public void handle_stfu(byte[] their_node_id, long msg) {
+ org.ldk.structs.Stfu msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Stfu(null, msg); }
+ arg.handle_stfu(their_node_id, msg_hu_conv);
+ Reference.reachabilityFence(arg);
+ }
+ @Override public void handle_splice(byte[] their_node_id, long msg) {
+ org.ldk.structs.Splice msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Splice(null, msg); }
+ arg.handle_splice(their_node_id, msg_hu_conv);
+ Reference.reachabilityFence(arg);
+ }
+ @Override public void handle_splice_ack(byte[] their_node_id, long msg) {
+ org.ldk.structs.SpliceAck msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.SpliceAck(null, msg); }
+ arg.handle_splice_ack(their_node_id, msg_hu_conv);
+ Reference.reachabilityFence(arg);
+ }
+ @Override public void handle_splice_locked(byte[] their_node_id, long msg) {
+ org.ldk.structs.SpliceLocked msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.SpliceLocked(null, msg); }
+ arg.handle_splice_locked(their_node_id, msg_hu_conv);
+ Reference.reachabilityFence(arg);
+ }
@Override public void handle_tx_add_input(byte[] their_node_id, long msg) {
org.ldk.structs.TxAddInput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAddInput(null, msg); }
arg.handle_tx_add_input(their_node_id, msg_hu_conv);
long result = ret == null ? 0 : ret.clone_ptr();
return result;
}
- @Override public long get_genesis_hashes() {
- Option_CVec_ThirtyTwoBytesZZ ret = arg.get_genesis_hashes();
+ @Override public long get_chain_hashes() {
+ Option_CVec_ThirtyTwoBytesZZ ret = arg.get_chain_hashes();
Reference.reachabilityFence(arg);
long result = ret == null ? 0 : ret.clone_ptr();
if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); };
if (this != null) { this.ptrs_to.add(msg); };
}
+ /**
+ * Handle an incoming `stfu` message from the given peer.
+ */
+ public void handle_stfu(byte[] their_node_id, org.ldk.structs.Stfu msg) {
+ bindings.ChannelMessageHandler_handle_stfu(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(their_node_id);
+ Reference.reachabilityFence(msg);
+ if (this != null) { this.ptrs_to.add(msg); };
+ }
+
+ /**
+ * Handle an incoming `splice` message from the given peer.
+ */
+ public void handle_splice(byte[] their_node_id, org.ldk.structs.Splice msg) {
+ bindings.ChannelMessageHandler_handle_splice(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(their_node_id);
+ Reference.reachabilityFence(msg);
+ if (this != null) { this.ptrs_to.add(msg); };
+ }
+
+ /**
+ * Handle an incoming `splice_ack` message from the given peer.
+ */
+ public void handle_splice_ack(byte[] their_node_id, org.ldk.structs.SpliceAck msg) {
+ bindings.ChannelMessageHandler_handle_splice_ack(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(their_node_id);
+ Reference.reachabilityFence(msg);
+ if (this != null) { this.ptrs_to.add(msg); };
+ }
+
+ /**
+ * Handle an incoming `splice_locked` message from the given peer.
+ */
+ public void handle_splice_locked(byte[] their_node_id, org.ldk.structs.SpliceLocked msg) {
+ bindings.ChannelMessageHandler_handle_splice_locked(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(their_node_id);
+ Reference.reachabilityFence(msg);
+ if (this != null) { this.ptrs_to.add(msg); };
+ }
+
/**
* Handle an incoming `tx_add_input message` from the given peer.
*/
}
/**
- * Gets the genesis hashes for this `ChannelMessageHandler` indicating which chains it supports.
+ * Gets the chain hashes for this `ChannelMessageHandler` indicating which chains it supports.
*
* If it's `None`, then no particular network chain hash compatibility will be enforced when
* connecting to peers.
*/
- public Option_CVec_ThirtyTwoBytesZZ get_genesis_hashes() {
- long ret = bindings.ChannelMessageHandler_get_genesis_hashes(this.ptr);
+ public Option_CVec_ThirtyTwoBytesZZ get_chain_hashes() {
+ long ret = bindings.ChannelMessageHandler_get_chain_hashes(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Option_CVec_ThirtyTwoBytesZZ ret_hu_conv = org.ldk.structs.Option_CVec_ThirtyTwoBytesZZ.constr_from_ptr(ret);