Expose SecretKey as byte[32], expose trait call fns in human structs
[ldk-java] / src / main / java / org / ldk / structs / ChannelKeys.java
index 014c2ff67e07855a51e388cb0fc0fd4433f68f6c..dc0a0cd0ea580e42eb3af2038063004147244175 100644 (file)
@@ -2,6 +2,8 @@ package org.ldk.structs;
 
 import org.ldk.impl.bindings;
 
+import org.ldk.enums.*;
+
 public class ChannelKeys extends CommonBase {
        ChannelKeys(Object _dummy, long ptr) { super(ptr); }
        public ChannelKeys(bindings.LDKChannelKeys arg) {
@@ -13,4 +15,27 @@ public class ChannelKeys extends CommonBase {
                bindings.ChannelKeys_free(ptr); super.finalize();
        }
 
+       public byte[] call_get_per_commitment_point(long idx) {
+               byte[] ret = bindings.ChannelKeys_call_get_per_commitment_point(this.ptr, idx);
+               return ret;
+       }
+
+       public byte[] call_release_commitment_secret(long idx) {
+               byte[] ret = bindings.ChannelKeys_call_release_commitment_secret(this.ptr, idx);
+               return ret;
+       }
+
+       // Skipped ChannelKeys_call_key_derivation_params
+       // Skipped ChannelKeys_call_sign_counterparty_commitment
+       // Skipped ChannelKeys_call_sign_holder_commitment
+       // Skipped ChannelKeys_call_sign_holder_commitment_htlc_transactions
+       // Skipped ChannelKeys_call_sign_justice_transaction
+       // Skipped ChannelKeys_call_sign_counterparty_htlc_transaction
+       // Skipped ChannelKeys_call_sign_closing_transaction
+       // Skipped ChannelKeys_call_sign_channel_announcement
+       public void call_on_accept(ChannelPublicKeys channel_points, short counterparty_selected_contest_delay, short holder_selected_contest_delay) {
+               bindings.ChannelKeys_call_on_accept(this.ptr, channel_points.ptr & ~1, counterparty_selected_contest_delay, holder_selected_contest_delay);
+               this.ptrs_to.add(channel_points);
+       }
+
 }