Class ChannelPublicKeys


  • public class ChannelPublicKeys
    extends Object
    One counterparty's public keys which do not change over the life of a channel.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ChannelPublicKeys clone()
      Creates a copy of the ChannelPublicKeys
      boolean eq​(ChannelPublicKeys b)
      Checks if two ChannelPublicKeyss contain equal inner contents.
      boolean equals​(Object o)  
      protected void finalize()  
      byte[] get_delayed_payment_basepoint()
      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).
      byte[] get_funding_pubkey()
      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.
      byte[] get_htlc_basepoint()
      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.
      byte[] get_payment_point()
      The public key on which the non-broadcaster (ie the countersignatory) receives an immediately spendable primary channel balance on the broadcaster's commitment transaction.
      byte[] get_revocation_basepoint()
      The base point which is used (with derive_public_revocation_key) to derive per-commitment revocation keys.
      static ChannelPublicKeys of​(byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg)
      Constructs a new ChannelPublicKeys given each field
      static Result_ChannelPublicKeysDecodeErrorZ read​(byte[] ser)
      Read a ChannelPublicKeys from a byte array, created by ChannelPublicKeys_write
      void set_delayed_payment_basepoint​(byte[] 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).
      void set_funding_pubkey​(byte[] val)
      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.
      void set_htlc_basepoint​(byte[] 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.
      void set_payment_point​(byte[] 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.
      void set_revocation_basepoint​(byte[] val)
      The base point which is used (with derive_public_revocation_key) to derive per-commitment revocation keys.
      byte[] write()
      Serialize the ChannelPublicKeys object into a byte array which can be read by ChannelPublicKeys_read
    • Method Detail

      • get_funding_pubkey

        public byte[] get_funding_pubkey()
        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.
      • set_funding_pubkey

        public void set_funding_pubkey​(byte[] val)
        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.
      • get_revocation_basepoint

        public byte[] get_revocation_basepoint()
        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.
      • set_revocation_basepoint

        public void set_revocation_basepoint​(byte[] 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.
      • get_payment_point

        public byte[] get_payment_point()
        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.
      • set_payment_point

        public void set_payment_point​(byte[] 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.
      • get_delayed_payment_basepoint

        public byte[] get_delayed_payment_basepoint()
        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).
      • set_delayed_payment_basepoint

        public void set_delayed_payment_basepoint​(byte[] 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).
      • get_htlc_basepoint

        public byte[] get_htlc_basepoint()
        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.
      • set_htlc_basepoint

        public void set_htlc_basepoint​(byte[] 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.
      • of

        public static ChannelPublicKeys of​(byte[] funding_pubkey_arg,
                                           byte[] revocation_basepoint_arg,
                                           byte[] payment_point_arg,
                                           byte[] delayed_payment_basepoint_arg,
                                           byte[] htlc_basepoint_arg)
        Constructs a new ChannelPublicKeys given each field
      • eq

        public boolean eq​(ChannelPublicKeys b)
        Checks if two ChannelPublicKeyss contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields. Two objects with NULL inner values will be considered "equal" here.
      • write

        public byte[] write()
        Serialize the ChannelPublicKeys object into a byte array which can be read by ChannelPublicKeys_read