X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FInMemoryChannelKeys.java;h=fa9ad9d5de46b0c3db28cb1c36cbe580d8895f16;hb=9e8763c71cd61d55be7c869d973524f75209a3f3;hp=53210e2990f3190626ee0299eb66de099989d963;hpb=90f8a21c87ba652884d5b94404b9b24a18f0cefc;p=ldk-java diff --git a/src/main/java/org/ldk/structs/InMemoryChannelKeys.java b/src/main/java/org/ldk/structs/InMemoryChannelKeys.java index 53210e29..fa9ad9d5 100644 --- a/src/main/java/org/ldk/structs/InMemoryChannelKeys.java +++ b/src/main/java/org/ldk/structs/InMemoryChannelKeys.java @@ -14,13 +14,6 @@ public class InMemoryChannelKeys extends CommonBase { if (ptr != 0) { bindings.InMemoryChannelKeys_free(ptr); } } - public static InMemoryChannelKeys constructor_clone(InMemoryChannelKeys orig) { - long ret = bindings.InMemoryChannelKeys_clone(orig == null ? 0 : orig.ptr & ~1); - InMemoryChannelKeys ret_hu_conv = new InMemoryChannelKeys(null, ret); - ret_hu_conv.ptrs_to.add(orig); - return ret_hu_conv; - } - public byte[] get_funding_key() { byte[] ret = bindings.InMemoryChannelKeys_get_funding_key(this.ptr); return ret; @@ -75,15 +68,24 @@ public class InMemoryChannelKeys extends CommonBase { bindings.InMemoryChannelKeys_set_commitment_seed(this.ptr, val); } + public InMemoryChannelKeys clone() { + long ret = bindings.InMemoryChannelKeys_clone(this.ptr); + InMemoryChannelKeys ret_hu_conv = new InMemoryChannelKeys(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + public static InMemoryChannelKeys constructor_new(byte[] funding_key, byte[] revocation_base_key, byte[] payment_key, byte[] delayed_payment_base_key, byte[] htlc_base_key, byte[] commitment_seed, long channel_value_satoshis, TwoTuple key_derivation_params) { long ret = bindings.InMemoryChannelKeys_new(funding_key, revocation_base_key, payment_key, delayed_payment_base_key, htlc_base_key, commitment_seed, channel_value_satoshis, bindings.C2Tuple_u64u64Z_new(key_derivation_params.a, key_derivation_params.b)); InMemoryChannelKeys ret_hu_conv = new InMemoryChannelKeys(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } public ChannelPublicKeys counterparty_pubkeys() { long ret = bindings.InMemoryChannelKeys_counterparty_pubkeys(this.ptr); ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -97,6 +99,25 @@ public class InMemoryChannelKeys extends CommonBase { return ret; } + public boolean is_outbound() { + boolean ret = bindings.InMemoryChannelKeys_is_outbound(this.ptr); + return ret; + } + + public OutPoint funding_outpoint() { + long ret = bindings.InMemoryChannelKeys_funding_outpoint(this.ptr); + OutPoint ret_hu_conv = new OutPoint(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + + public ChannelTransactionParameters get_channel_parameters() { + long ret = bindings.InMemoryChannelKeys_get_channel_parameters(this.ptr); + ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + public ChannelKeys as_ChannelKeys() { long ret = bindings.InMemoryChannelKeys_as_ChannelKeys(this.ptr); ChannelKeys ret_hu_conv = new ChannelKeys(null, ret); @@ -109,9 +130,9 @@ public class InMemoryChannelKeys extends CommonBase { return ret; } - public static InMemoryChannelKeys constructor_read(byte[] ser) { + public static Result_InMemoryChannelKeysDecodeErrorZ constructor_read(byte[] ser) { long ret = bindings.InMemoryChannelKeys_read(ser); - InMemoryChannelKeys ret_hu_conv = new InMemoryChannelKeys(null, ret); + Result_InMemoryChannelKeysDecodeErrorZ ret_hu_conv = Result_InMemoryChannelKeysDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }