+ /**
+ * [`KeysInterface::get_shutdown_scriptpubkey`] returned a shutdown scriptpubkey incompatible
+ * with the channel counterparty as negotiated in [`InitFeatures`].
+ *
+ * Using a SegWit v0 script should resolve this issue. If you cannot, you won't be able to open
+ * a channel or cooperatively close one with this peer (and will have to force-close instead).
+ *
+ * [`KeysInterface::get_shutdown_scriptpubkey`]: crate::chain::keysinterface::KeysInterface::get_shutdown_scriptpubkey
+ * [`InitFeatures`]: crate::ln::features::InitFeatures
+ */
+ public final static class IncompatibleShutdownScript extends APIError {
+ /**
+ * The incompatible shutdown script.
+ */
+ public final ShutdownScript script;
+ private IncompatibleShutdownScript(long ptr, bindings.LDKAPIError.IncompatibleShutdownScript obj) {
+ super(null, ptr);
+ long script = obj.script;
+ ShutdownScript script_hu_conv = null; if (script < 0 || script > 4096) { script_hu_conv = new ShutdownScript(null, script); }
+ script_hu_conv.ptrs_to.add(this);
+ this.script = script_hu_conv;
+ }
+ }
+ long clone_ptr() {
+ long ret = bindings.APIError_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+