Update auto-generated bindings
[ldk-java] / ts / enums / ChannelMonitorUpdateErr.ts
1
2             export enum ChannelMonitorUpdateErr {
3                 /**
4  * Used to indicate a temporary failure (eg connection to a watchtower or remote backup of
5 our state failed, but is expected to succeed at some point in the future).
6
7 Such a failure will \"freeze\" a channel, preventing us from revoking old states or
8 submitting new commitment transactions to the counterparty. Once the update(s) that failed
9 have been successfully applied, a [`MonitorEvent::UpdateCompleted`] event should be returned
10 via [`Watch::release_pending_monitor_events`] which will then restore the channel to an
11 operational state.
12
13 Note that a given ChannelManager will *never* re-generate a given ChannelMonitorUpdate. If
14 you return a TemporaryFailure you must ensure that it is written to disk safely before
15 writing out the latest ChannelManager state.
16
17 Even when a channel has been \"frozen\" updates to the ChannelMonitor can continue to occur
18 (eg if an inbound HTLC which we forwarded was claimed upstream resulting in us attempting
19 to claim it on this channel) and those updates must be applied wherever they can be. At
20 least one such updated ChannelMonitor must be persisted otherwise PermanentFailure should
21 be returned to get things on-chain ASAP using only the in-memory copy. Obviously updates to
22 the channel which would invalidate previous ChannelMonitors are not made when a channel has
23 been \"frozen\".
24
25 Note that even if updates made after TemporaryFailure succeed you must still provide a
26 [`MonitorEvent::UpdateCompleted`] to ensure you have the latest monitor and re-enable
27 normal channel operation. Note that this is normally generated through a call to
28 [`ChainMonitor::channel_monitor_updated`].
29
30 Note that the update being processed here will not be replayed for you when you return a
31 [`MonitorEvent::UpdateCompleted`] event via [`Watch::release_pending_monitor_events`], so
32 you must store the update itself on your own local disk prior to returning a
33 TemporaryFailure. You may, of course, employ a journaling approach, storing only the
34 ChannelMonitorUpdate on disk without updating the monitor itself, replaying the journal at
35 reload-time.
36
37 For deployments where a copy of ChannelMonitors and other local state are backed up in a
38 remote location (with local copies persisted immediately), it is anticipated that all
39 updates will return TemporaryFailure until the remote copies could be updated.
40
41 [`ChainMonitor::channel_monitor_updated`]: chainmonitor::ChainMonitor::channel_monitor_updated
42  */
43 LDKChannelMonitorUpdateErr_TemporaryFailure,
44                                 /**
45  * Used to indicate no further channel monitor updates will be allowed (eg we've moved on to a
46 different watchtower and cannot update with all watchtowers that were previously informed
47 of this channel).
48
49 At reception of this error, ChannelManager will force-close the channel and return at
50 least a final ChannelMonitorUpdate::ChannelForceClosed which must be delivered to at
51 least one ChannelMonitor copy. Revocation secret MUST NOT be released and offchain channel
52 update must be rejected.
53
54 This failure may also signal a failure to update the local persisted copy of one of
55 the channel monitor instance.
56
57 Note that even when you fail a holder commitment transaction update, you must store the
58 update to ensure you can claim from it in case of a duplicate copy of this ChannelMonitor
59 broadcasts it (e.g distributed channel-monitor deployment)
60
61 In case of distributed watchtowers deployment, the new version must be written to disk, as
62 state may have been stored but rejected due to a block forcing a commitment broadcast. This
63 storage is used to claim outputs of rejected state confirmed onchain by another watchtower,
64 lagging behind on block processing.
65  */
66 LDKChannelMonitorUpdateErr_PermanentFailure,
67                                 
68             }