You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/build_a_node_in_java.md
+25-1Lines changed: 25 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -167,24 +167,48 @@ class YourObj implements ChannelManagerConstructor.EventHandler {
167
167
elseif (e instanceofEvent.PaymentReceived) {
168
168
// <insert code to handle this event>
169
169
}
170
+
elseif (e instanceofEvent.PaymentClaimed) {
171
+
// <insert code to handle this event>
172
+
}
170
173
elseif (e instanceofEvent.PaymentSent) {
171
174
// <insert code to handle this event>
172
175
}
176
+
elseif (e instanceofEvent.PaymentFailed) {
177
+
// <insert code to handle this event>
178
+
}
179
+
elseif (e instanceofEvent.PaymentPathSuccessful) {
180
+
// <insert code to handle this event>
181
+
}
173
182
elseif (e instanceofEvent.PaymentPathFailed) {
174
183
// <insert code to handle this event>
175
184
}
185
+
elseif (e instanceofEvent.ProbeSuccessful) {
186
+
// <insert code to handle this event>
187
+
}
188
+
elseif (e instanceofEvent.ProbeFailed) {
189
+
// <insert code to handle this event>
190
+
}
191
+
elseif (e instanceofEvent.HTLCHandlingFailed) {
192
+
// <insert code to handle this event>
193
+
}
176
194
elseif (e instanceofEvent.PendingHTLCsForwardable) {
177
195
// <insert code to handle this event>
178
196
}
179
197
elseif (e instanceofEvent.SpendableOutputs) {
180
198
// <insert code to handle this event>
181
199
}
200
+
elseif (e instanceofEvent.OpenChannelRequest) {
201
+
// <insert code to handle this event>
202
+
}
182
203
elseif (e instanceofEvent.PaymentForwarded) {
183
204
// <insert code to handle this event>
184
205
}
185
206
elseif (e instanceofEvent.ChannelClosed) {
186
207
// <insert code to handle this event>
187
208
}
209
+
elseif (e instanceofEvent.DiscardFunding) {
210
+
// <insert code to handle this event>
211
+
}
188
212
}
189
213
190
214
@Override
@@ -208,7 +232,7 @@ ChannelManagerConstructor.EventHandler customEventHandler = new YourObj();
208
232
* It's important to read the documentation (linked in References) for each event
209
233
to make sure you satisfy the API requirements for handling it
210
234
211
-
**References:**[Example of handling LDK events in Rust](https://github.com/lightningdevkit/ldk-sample/blob/bc07db6ca4a3323d8718a27f85182b8157a20750/src/main.rs#L101-L240),
235
+
**References:**[Example of handling LDK events in Rust](https://github.com/lightningdevkit/ldk-sample/blob/39dda99b6977b8d976f4827486004503da91a760/src/main.rs#L115-L356),
212
236
[Rust docs for LDK events](https://docs.rs/lightning/*/lightning/util/events/enum.Event.html)
213
237
214
238
### 7. Optional: Initialize the Transaction `Filter`
0 commit comments