Class ChannelCounterparty


  • public class ChannelCounterparty
    extends Object
    Channel parameters which apply to our counterparty. These are split out from [`ChannelDetails`] to better separate parameters.
    • Method Detail

      • get_node_id

        public byte[] get_node_id()
        The node_id of our counterparty
      • set_node_id

        public void set_node_id​(byte[] val)
        The node_id of our counterparty
      • get_features

        public InitFeatures get_features()
        The Features the channel counterparty provided upon last connection. Useful for routing as it is the most up-to-date copy of the counterparty's features and many routing-relevant features are present in the init context.
      • set_features

        public void set_features​(InitFeatures val)
        The Features the channel counterparty provided upon last connection. Useful for routing as it is the most up-to-date copy of the counterparty's features and many routing-relevant features are present in the init context.
      • get_unspendable_punishment_reserve

        public long get_unspendable_punishment_reserve()
        The value, in satoshis, that must always be held in the channel for our counterparty. This value ensures that if our counterparty broadcasts a revoked state, we can punish them by claiming at least this value on chain. This value is not included in [`inbound_capacity_msat`] as it can never be spent. [`inbound_capacity_msat`]: ChannelDetails::inbound_capacity_msat
      • set_unspendable_punishment_reserve

        public void set_unspendable_punishment_reserve​(long val)
        The value, in satoshis, that must always be held in the channel for our counterparty. This value ensures that if our counterparty broadcasts a revoked state, we can punish them by claiming at least this value on chain. This value is not included in [`inbound_capacity_msat`] as it can never be spent. [`inbound_capacity_msat`]: ChannelDetails::inbound_capacity_msat
      • get_forwarding_info

        @Nullable
        public CounterpartyForwardingInfo get_forwarding_info()
        Information on the fees and requirements that the counterparty requires when forwarding payments to us through this channel. Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
      • set_forwarding_info

        public void set_forwarding_info​(@Nullable
                                        CounterpartyForwardingInfo val)
        Information on the fees and requirements that the counterparty requires when forwarding payments to us through this channel. Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
      • get_outbound_htlc_minimum_msat

        public Option_u64Z get_outbound_htlc_minimum_msat()
        The smallest value HTLC (in msat) the remote peer will accept, for this channel. This field is only `None` before we have received either the `OpenChannel` or `AcceptChannel` message from the remote peer, or for `ChannelCounterparty` objects serialized prior to LDK 0.0.107.
      • set_outbound_htlc_minimum_msat

        public void set_outbound_htlc_minimum_msat​(Option_u64Z val)
        The smallest value HTLC (in msat) the remote peer will accept, for this channel. This field is only `None` before we have received either the `OpenChannel` or `AcceptChannel` message from the remote peer, or for `ChannelCounterparty` objects serialized prior to LDK 0.0.107.
      • get_outbound_htlc_maximum_msat

        public Option_u64Z get_outbound_htlc_maximum_msat()
        The largest value HTLC (in msat) the remote peer currently will accept, for this channel.
      • set_outbound_htlc_maximum_msat

        public void set_outbound_htlc_maximum_msat​(Option_u64Z val)
        The largest value HTLC (in msat) the remote peer currently will accept, for this channel.
      • write

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