X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FChannelPublicKeys.java;fp=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FChannelPublicKeys.java;h=c67b24a71cbf69da3515ef2b9c9b37fb63b71ca9;hb=1b870a3ffab1c0024411e30102bc6d198300f095;hp=0d2664a6d46f16bcd4d201b082b3cdc0583da16f;hpb=246459dcbc3be28c38b4951140a5933f4b3aa024;p=ldk-java diff --git a/src/main/java/org/ldk/structs/ChannelPublicKeys.java b/src/main/java/org/ldk/structs/ChannelPublicKeys.java index 0d2664a6..c67b24a7 100644 --- a/src/main/java/org/ldk/structs/ChannelPublicKeys.java +++ b/src/main/java/org/ldk/structs/ChannelPublicKeys.java @@ -5,6 +5,10 @@ import org.ldk.enums.*; import org.ldk.util.*; import java.util.Arrays; + +/** + * One counterparty's public keys which do not change over the life of a channel. + */ @SuppressWarnings("unchecked") // We correctly assign various generic arrays public class ChannelPublicKeys extends CommonBase { ChannelPublicKeys(Object _dummy, long ptr) { super(ptr); } @@ -14,51 +18,102 @@ public class ChannelPublicKeys extends CommonBase { if (ptr != 0) { bindings.ChannelPublicKeys_free(ptr); } } + /** + * The public key which is used to sign all commitment transactions, as it appears in the + * on-chain channel lock-in 2-of-2 multisig output. + */ public byte[] get_funding_pubkey() { byte[] ret = bindings.ChannelPublicKeys_get_funding_pubkey(this.ptr); return ret; } + /** + * The public key which is used to sign all commitment transactions, as it appears in the + * on-chain channel lock-in 2-of-2 multisig output. + */ public void set_funding_pubkey(byte[] val) { bindings.ChannelPublicKeys_set_funding_pubkey(this.ptr, val); } + /** + * The base point which is used (with derive_public_revocation_key) to derive per-commitment + * revocation keys. This is combined with the per-commitment-secret generated by the + * counterparty to create a secret which the counterparty can reveal to revoke previous + * states. + */ public byte[] get_revocation_basepoint() { byte[] ret = bindings.ChannelPublicKeys_get_revocation_basepoint(this.ptr); return ret; } + /** + * The base point which is used (with derive_public_revocation_key) to derive per-commitment + * revocation keys. This is combined with the per-commitment-secret generated by the + * counterparty to create a secret which the counterparty can reveal to revoke previous + * states. + */ public void set_revocation_basepoint(byte[] val) { bindings.ChannelPublicKeys_set_revocation_basepoint(this.ptr, val); } + /** + * The public key on which the non-broadcaster (ie the countersignatory) receives an immediately + * spendable primary channel balance on the broadcaster's commitment transaction. This key is + * static across every commitment transaction. + */ public byte[] get_payment_point() { byte[] ret = bindings.ChannelPublicKeys_get_payment_point(this.ptr); return ret; } + /** + * The public key on which the non-broadcaster (ie the countersignatory) receives an immediately + * spendable primary channel balance on the broadcaster's commitment transaction. This key is + * static across every commitment transaction. + */ public void set_payment_point(byte[] val) { bindings.ChannelPublicKeys_set_payment_point(this.ptr, val); } + /** + * The base point which is used (with derive_public_key) to derive a per-commitment payment + * public key which receives non-HTLC-encumbered funds which are only available for spending + * after some delay (or can be claimed via the revocation path). + */ public byte[] get_delayed_payment_basepoint() { byte[] ret = bindings.ChannelPublicKeys_get_delayed_payment_basepoint(this.ptr); return ret; } + /** + * The base point which is used (with derive_public_key) to derive a per-commitment payment + * public key which receives non-HTLC-encumbered funds which are only available for spending + * after some delay (or can be claimed via the revocation path). + */ public void set_delayed_payment_basepoint(byte[] val) { bindings.ChannelPublicKeys_set_delayed_payment_basepoint(this.ptr, val); } + /** + * The base point which is used (with derive_public_key) to derive a per-commitment public key + * which is used to encumber HTLC-in-flight outputs. + */ public byte[] get_htlc_basepoint() { byte[] ret = bindings.ChannelPublicKeys_get_htlc_basepoint(this.ptr); return ret; } + /** + * The base point which is used (with derive_public_key) to derive a per-commitment public key + * which is used to encumber HTLC-in-flight outputs. + */ public void set_htlc_basepoint(byte[] val) { bindings.ChannelPublicKeys_set_htlc_basepoint(this.ptr, val); } + /** + * Constructs a new ChannelPublicKeys given each field + */ public static ChannelPublicKeys constructor_new(byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg) { long ret = bindings.ChannelPublicKeys_new(funding_pubkey_arg, revocation_basepoint_arg, payment_point_arg, delayed_payment_basepoint_arg, htlc_basepoint_arg); ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); @@ -66,6 +121,9 @@ public class ChannelPublicKeys extends CommonBase { return ret_hu_conv; } + /** + * Creates a copy of the ChannelPublicKeys + */ public ChannelPublicKeys clone() { long ret = bindings.ChannelPublicKeys_clone(this.ptr); ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); @@ -73,11 +131,17 @@ public class ChannelPublicKeys extends CommonBase { return ret_hu_conv; } + /** + * Serialize the ChannelPublicKeys object into a byte array which can be read by ChannelPublicKeys_read + */ public byte[] write() { byte[] ret = bindings.ChannelPublicKeys_write(this.ptr); return ret; } + /** + * Read a ChannelPublicKeys from a byte array, created by ChannelPublicKeys_write + */ public static Result_ChannelPublicKeysDecodeErrorZ constructor_read(byte[] ser) { long ret = bindings.ChannelPublicKeys_read(ser); Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);