Merge pull request #18 from TheBlueMatt/main
[ldk-java] / src / main / java / org / ldk / structs / ChannelHandshakeConfig.java
index 2b1a7eeedc1fd065e80c1f0770e830cf95ed413b..414c760689508b073b9f82eba123efede7d95818 100644 (file)
@@ -44,18 +44,21 @@ public class ChannelHandshakeConfig extends CommonBase {
        }
 
        /**
-        * Set to the amount of time we require our counterparty to wait to claim their money.
+        * Set to the number of blocks we require our counterparty to wait to claim their money (ie
+        * the number of blocks we have to punish our counterparty if they broadcast a revoked
+        * transaction).
         * 
-        * It's one of the main parameter of our security model. We (or one of our watchtowers) MUST
-        * be online to check for peer having broadcast a revoked transaction to steal our funds
-        * at least once every our_to_self_delay blocks.
+        * This is one of the main parameters of our security model. We (or one of our watchtowers) MUST
+        * be online to check for revoked transactions on-chain at least once every our_to_self_delay
+        * blocks (minus some margin to allow us enough time to broadcast and confirm a transaction,
+        * possibly with time in between to RBF the spending transaction).
         * 
         * Meanwhile, asking for a too high delay, we bother peer to freeze funds for nothing in
         * case of an honest unilateral channel close, which implicitly decrease the economic value of
         * our channel.
         * 
-        * Default value: BREAKDOWN_TIMEOUT (currently 144), we enforce it as a minimum at channel
-        * opening so you can tweak config to ask for more security, not less.
+        * Default value: [`BREAKDOWN_TIMEOUT`], we enforce it as a minimum at channel opening so you
+        * can tweak config to ask for more security, not less.
         */
        public short get_our_to_self_delay() {
                short ret = bindings.ChannelHandshakeConfig_get_our_to_self_delay(this.ptr);
@@ -63,18 +66,21 @@ public class ChannelHandshakeConfig extends CommonBase {
        }
 
        /**
-        * Set to the amount of time we require our counterparty to wait to claim their money.
+        * Set to the number of blocks we require our counterparty to wait to claim their money (ie
+        * the number of blocks we have to punish our counterparty if they broadcast a revoked
+        * transaction).
         * 
-        * It's one of the main parameter of our security model. We (or one of our watchtowers) MUST
-        * be online to check for peer having broadcast a revoked transaction to steal our funds
-        * at least once every our_to_self_delay blocks.
+        * This is one of the main parameters of our security model. We (or one of our watchtowers) MUST
+        * be online to check for revoked transactions on-chain at least once every our_to_self_delay
+        * blocks (minus some margin to allow us enough time to broadcast and confirm a transaction,
+        * possibly with time in between to RBF the spending transaction).
         * 
         * Meanwhile, asking for a too high delay, we bother peer to freeze funds for nothing in
         * case of an honest unilateral channel close, which implicitly decrease the economic value of
         * our channel.
         * 
-        * Default value: BREAKDOWN_TIMEOUT (currently 144), we enforce it as a minimum at channel
-        * opening so you can tweak config to ask for more security, not less.
+        * Default value: [`BREAKDOWN_TIMEOUT`], we enforce it as a minimum at channel opening so you
+        * can tweak config to ask for more security, not less.
         */
        public void set_our_to_self_delay(short val) {
                bindings.ChannelHandshakeConfig_set_our_to_self_delay(this.ptr, val);
@@ -110,7 +116,7 @@ public class ChannelHandshakeConfig extends CommonBase {
        /**
         * Constructs a new ChannelHandshakeConfig given each field
         */
-       public static ChannelHandshakeConfig constructor_new(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg) {
+       public static ChannelHandshakeConfig of(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg) {
                long ret = bindings.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
                ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
@@ -130,7 +136,7 @@ public class ChannelHandshakeConfig extends CommonBase {
        /**
         * Creates a "default" ChannelHandshakeConfig. See struct and individual field documentaiton for details on which values are used.
         */
-       public static ChannelHandshakeConfig constructor_default() {
+       public static ChannelHandshakeConfig with_default() {
                long ret = bindings.ChannelHandshakeConfig_default();
                ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);