71e1a6133b6f12683798acd2d7c95b0c94549ccc
[ldk-java] / ts / structs / ChannelMessageHandler.ts
1         public void handle_open_channel(byte[] their_node_id, InitFeatures their_features, OpenChannel msg) {
2                 bindings.ChannelMessageHandler_handle_open_channel(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1);
3                 this.ptrs_to.add(their_features);
4                 this.ptrs_to.add(msg);
5         }
6
7         public void handle_accept_channel(byte[] their_node_id, InitFeatures their_features, AcceptChannel msg) {
8                 bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1);
9                 this.ptrs_to.add(their_features);
10                 this.ptrs_to.add(msg);
11         }
12
13         public void handle_funding_created(byte[] their_node_id, FundingCreated msg) {
14                 bindings.ChannelMessageHandler_handle_funding_created(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
15                 this.ptrs_to.add(msg);
16         }
17
18         public void handle_funding_signed(byte[] their_node_id, FundingSigned msg) {
19                 bindings.ChannelMessageHandler_handle_funding_signed(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
20                 this.ptrs_to.add(msg);
21         }
22
23         public void handle_funding_locked(byte[] their_node_id, FundingLocked msg) {
24                 bindings.ChannelMessageHandler_handle_funding_locked(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
25                 this.ptrs_to.add(msg);
26         }
27
28         public void handle_shutdown(byte[] their_node_id, Shutdown msg) {
29                 bindings.ChannelMessageHandler_handle_shutdown(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
30                 this.ptrs_to.add(msg);
31         }
32
33         public void handle_closing_signed(byte[] their_node_id, ClosingSigned msg) {
34                 bindings.ChannelMessageHandler_handle_closing_signed(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
35                 this.ptrs_to.add(msg);
36         }
37
38         public void handle_update_add_htlc(byte[] their_node_id, UpdateAddHTLC msg) {
39                 bindings.ChannelMessageHandler_handle_update_add_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
40                 this.ptrs_to.add(msg);
41         }
42
43         public void handle_update_fulfill_htlc(byte[] their_node_id, UpdateFulfillHTLC msg) {
44                 bindings.ChannelMessageHandler_handle_update_fulfill_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
45                 this.ptrs_to.add(msg);
46         }
47
48         public void handle_update_fail_htlc(byte[] their_node_id, UpdateFailHTLC msg) {
49                 bindings.ChannelMessageHandler_handle_update_fail_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
50                 this.ptrs_to.add(msg);
51         }
52
53         public void handle_update_fail_malformed_htlc(byte[] their_node_id, UpdateFailMalformedHTLC msg) {
54                 bindings.ChannelMessageHandler_handle_update_fail_malformed_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
55                 this.ptrs_to.add(msg);
56         }
57
58         public void handle_commitment_signed(byte[] their_node_id, CommitmentSigned msg) {
59                 bindings.ChannelMessageHandler_handle_commitment_signed(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
60                 this.ptrs_to.add(msg);
61         }
62
63         public void handle_revoke_and_ack(byte[] their_node_id, RevokeAndACK msg) {
64                 bindings.ChannelMessageHandler_handle_revoke_and_ack(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
65                 this.ptrs_to.add(msg);
66         }
67
68         public void handle_update_fee(byte[] their_node_id, UpdateFee msg) {
69                 bindings.ChannelMessageHandler_handle_update_fee(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
70                 this.ptrs_to.add(msg);
71         }
72
73         public void handle_announcement_signatures(byte[] their_node_id, AnnouncementSignatures msg) {
74                 bindings.ChannelMessageHandler_handle_announcement_signatures(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
75                 this.ptrs_to.add(msg);
76         }
77
78         public void peer_disconnected(byte[] their_node_id, boolean no_connection_possible) {
79                 bindings.ChannelMessageHandler_peer_disconnected(this.ptr, their_node_id, no_connection_possible);
80         }
81
82         public void peer_connected(byte[] their_node_id, Init msg) {
83                 bindings.ChannelMessageHandler_peer_connected(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
84                 this.ptrs_to.add(msg);
85         }
86
87         public void handle_channel_reestablish(byte[] their_node_id, ChannelReestablish msg) {
88                 bindings.ChannelMessageHandler_handle_channel_reestablish(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
89                 this.ptrs_to.add(msg);
90         }
91
92         public void handle_error(byte[] their_node_id, ErrorMessage msg) {
93                 bindings.ChannelMessageHandler_handle_error(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
94                 this.ptrs_to.add(msg);
95         }
96
97 }