Package org.ldk.structs
Class APIError
- java.lang.Object
-
- org.ldk.structs.APIError
-
- Direct Known Subclasses:
APIError.APIMisuseError
,APIError.ChannelUnavailable
,APIError.FeeRateTooHigh
,APIError.IncompatibleShutdownScript
,APIError.InvalidRoute
,APIError.MonitorUpdateInProgress
public class APIError extends Object
Indicates an error on the client's part (usually some variant of attempting to use too-low or too-high values)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
APIError.APIMisuseError
Indicates the API was wholly misused (see err for more).static class
APIError.ChannelUnavailable
We were unable to complete the request as the Channel required to do so is unable to complete the request (or was not found).static class
APIError.FeeRateTooHigh
Due to a high feerate, we were unable to complete the request.static class
APIError.IncompatibleShutdownScript
[`SignerProvider::get_shutdown_scriptpubkey`] returned a shutdown scriptpubkey incompatible with the channel counterparty as negotiated in [`InitFeatures`].static class
APIError.InvalidRoute
A malformed Route was provided (eg overflowed value, node id mismatch, overly-looped route, too-many-hops, etc).static class
APIError.MonitorUpdateInProgress
An attempt to call [`chain::Watch::watch_channel`]/[`chain::Watch::update_channel`] returned a [`ChannelMonitorUpdateStatus::InProgress`] indicating the persistence of a monitor update is awaiting async resolution.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static APIError
apimisuse_error(String err)
Utility method to constructs a new APIMisuseError-variant APIErrorstatic APIError
channel_unavailable(String err)
Utility method to constructs a new ChannelUnavailable-variant APIErrorAPIError
clone()
Creates a copy of the APIErrorboolean
eq(APIError b)
Checks if two APIErrors contain equal inner contents.boolean
equals(Object o)
static APIError
fee_rate_too_high(String err, int feerate)
Utility method to constructs a new FeeRateTooHigh-variant APIErrorprotected void
finalize()
static APIError
incompatible_shutdown_script(ShutdownScript script)
Utility method to constructs a new IncompatibleShutdownScript-variant APIErrorstatic APIError
invalid_route(String err)
Utility method to constructs a new InvalidRoute-variant APIErrorstatic APIError
monitor_update_in_progress()
Utility method to constructs a new MonitorUpdateInProgress-variant APIErrorbyte[]
write()
Serialize the APIError object into a byte array which can be read by APIError_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
apimisuse_error
public static APIError apimisuse_error(String err)
Utility method to constructs a new APIMisuseError-variant APIError
-
fee_rate_too_high
public static APIError fee_rate_too_high(String err, int feerate)
Utility method to constructs a new FeeRateTooHigh-variant APIError
-
invalid_route
public static APIError invalid_route(String err)
Utility method to constructs a new InvalidRoute-variant APIError
-
channel_unavailable
public static APIError channel_unavailable(String err)
Utility method to constructs a new ChannelUnavailable-variant APIError
-
monitor_update_in_progress
public static APIError monitor_update_in_progress()
Utility method to constructs a new MonitorUpdateInProgress-variant APIError
-
incompatible_shutdown_script
public static APIError incompatible_shutdown_script(ShutdownScript script)
Utility method to constructs a new IncompatibleShutdownScript-variant APIError
-
eq
public boolean eq(APIError b)
Checks if two APIErrors contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields.
-
write
public byte[] write()
Serialize the APIError object into a byte array which can be read by APIError_read
-
-