X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FUpdateAddHTLC.cs;fp=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FUpdateAddHTLC.cs;h=9b7e8db6de2c5a1b06a287e15267dc470f19d58b;hb=c6777737ea14e7814b0fa7d6fe16536f31d4a82b;hp=42056273bc156666411a991e290d1d3ab15d8d11;hpb=ee72c84d4bf9e2404e02fe20155efb502ceaee1b;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/UpdateAddHTLC.cs b/c_sharp/src/org/ldk/structs/UpdateAddHTLC.cs index 42056273..9b7e8db6 100644 --- a/c_sharp/src/org/ldk/structs/UpdateAddHTLC.cs +++ b/c_sharp/src/org/ldk/structs/UpdateAddHTLC.cs @@ -7,7 +7,9 @@ namespace org { namespace ldk { namespace structs { /** - * An update_add_htlc message to be sent or received from a peer + * An [`update_add_htlc`] message to be sent to or received from a peer. + * + * [`update_add_htlc`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#adding-an-htlc-update_add_htlc */ public class UpdateAddHTLC : CommonBase { internal UpdateAddHTLC(object _dummy, long ptr) : base(ptr) { } @@ -105,6 +107,34 @@ public class UpdateAddHTLC : CommonBase { GC.KeepAlive(val); } + /** + * The extra fee skimmed by the sender of this message. See + * [`ChannelConfig::accept_underpaying_htlcs`]. + * + * [`ChannelConfig::accept_underpaying_htlcs`]: crate::util::config::ChannelConfig::accept_underpaying_htlcs + */ + public Option_u64Z get_skimmed_fee_msat() { + long ret = bindings.UpdateAddHTLC_get_skimmed_fee_msat(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * The extra fee skimmed by the sender of this message. See + * [`ChannelConfig::accept_underpaying_htlcs`]. + * + * [`ChannelConfig::accept_underpaying_htlcs`]: crate::util::config::ChannelConfig::accept_underpaying_htlcs + */ + public void set_skimmed_fee_msat(org.ldk.structs.Option_u64Z val) { + bindings.UpdateAddHTLC_set_skimmed_fee_msat(this.ptr, val.ptr); + GC.KeepAlive(this); + GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; + } + internal long clone_ptr() { long ret = bindings.UpdateAddHTLC_clone_ptr(this.ptr); GC.KeepAlive(this);