[TS] Update auto-generated bindings to LDK-C-Bindings 0.0.123.1
[ldk-java] / c_sharp / src / org / ldk / structs / BumpTransactionEventHandler.cs
1 using org.ldk.impl;
2 using org.ldk.enums;
3 using org.ldk.util;
4 using System;
5
6 namespace org { namespace ldk { namespace structs {
7
8
9 /**
10  * A handler for [`Event::BumpTransaction`] events that sources confirmed UTXOs from a
11  * [`CoinSelectionSource`] to fee bump transactions via Child-Pays-For-Parent (CPFP) or
12  * Replace-By-Fee (RBF).
13  * 
14  * [`Event::BumpTransaction`]: crate::events::Event::BumpTransaction
15  */
16 public class BumpTransactionEventHandler : CommonBase {
17         internal BumpTransactionEventHandler(object _dummy, long ptr) : base(ptr) { }
18         ~BumpTransactionEventHandler() {
19                 if (ptr != 0) { bindings.BumpTransactionEventHandler_free(ptr); }
20         }
21
22         /**
23          * Returns a new instance capable of handling [`Event::BumpTransaction`] events.
24          * 
25          * [`Event::BumpTransaction`]: crate::events::Event::BumpTransaction
26          */
27         public static BumpTransactionEventHandler of(org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.CoinSelectionSource utxo_source, org.ldk.structs.SignerProvider signer_provider, org.ldk.structs.Logger logger) {
28                 long ret = bindings.BumpTransactionEventHandler_new(broadcaster.ptr, utxo_source.ptr, signer_provider.ptr, logger.ptr);
29                 GC.KeepAlive(broadcaster);
30                 GC.KeepAlive(utxo_source);
31                 GC.KeepAlive(signer_provider);
32                 GC.KeepAlive(logger);
33                 if (ret >= 0 && ret <= 4096) { return null; }
34                 org.ldk.structs.BumpTransactionEventHandler ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BumpTransactionEventHandler(null, ret); }
35                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
36                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(broadcaster); };
37                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(utxo_source); };
38                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(signer_provider); };
39                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(logger); };
40                 return ret_hu_conv;
41         }
42
43         /**
44          * Handles all variants of [`BumpTransactionEvent`].
45          */
46         public void handle_event(org.ldk.structs.BumpTransactionEvent _event) {
47                 bindings.BumpTransactionEventHandler_handle_event(this.ptr, _event.ptr);
48                 GC.KeepAlive(this);
49                 GC.KeepAlive(_event);
50         }
51
52 }
53 } } }