Class ChannelTransactionParameters


  • public class ChannelTransactionParameters
    extends Object
    Per-channel data used to build transactions in conjunction with the per-commitment data (CommitmentTransaction). The fields are organized by holder/counterparty. Normally, this is converted to the broadcaster/countersignatory-organized DirectedChannelTransactionParameters before use, via the as_holder_broadcastable and as_counterparty_broadcastable functions.
    • Method Detail

      • get_holder_pubkeys

        public ChannelPublicKeys get_holder_pubkeys()
        Holder public keys
      • set_holder_pubkeys

        public void set_holder_pubkeys​(ChannelPublicKeys val)
        Holder public keys
      • get_holder_selected_contest_delay

        public short get_holder_selected_contest_delay()
        The contest delay selected by the holder, which applies to counterparty-broadcast transactions
      • set_holder_selected_contest_delay

        public void set_holder_selected_contest_delay​(short val)
        The contest delay selected by the holder, which applies to counterparty-broadcast transactions
      • get_is_outbound_from_holder

        public boolean get_is_outbound_from_holder()
        Whether the holder is the initiator of this channel. This is an input to the commitment number obscure factor computation.
      • set_is_outbound_from_holder

        public void set_is_outbound_from_holder​(boolean val)
        Whether the holder is the initiator of this channel. This is an input to the commitment number obscure factor computation.
      • get_counterparty_parameters

        @Nullable
        public CounterpartyChannelTransactionParameters get_counterparty_parameters()
        The late-bound counterparty channel transaction parameters. These parameters are populated at the point in the protocol where the counterparty provides them. Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
      • set_counterparty_parameters

        public void set_counterparty_parameters​(@Nullable
                                                CounterpartyChannelTransactionParameters val)
        The late-bound counterparty channel transaction parameters. These parameters are populated at the point in the protocol where the counterparty provides them. Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
      • get_funding_outpoint

        @Nullable
        public OutPoint get_funding_outpoint()
        The late-bound funding outpoint Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
      • set_funding_outpoint

        public void set_funding_outpoint​(@Nullable
                                         OutPoint val)
        The late-bound funding outpoint Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
      • get_channel_type_features

        public ChannelTypeFeatures get_channel_type_features()
        This channel's type, as negotiated during channel open. For old objects where this field wasn't serialized, it will default to static_remote_key at deserialization.
      • set_channel_type_features

        public void set_channel_type_features​(ChannelTypeFeatures val)
        This channel's type, as negotiated during channel open. For old objects where this field wasn't serialized, it will default to static_remote_key at deserialization.
      • hash

        public long hash()
        Generates a non-cryptographic 64-bit hash of the ChannelTransactionParameters.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • eq

        public boolean eq​(ChannelTransactionParameters b)
        Checks if two ChannelTransactionParameterss 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.
      • is_populated

        public boolean is_populated()
        Whether the late bound parameters are populated.
      • as_holder_broadcastable

        public DirectedChannelTransactionParameters as_holder_broadcastable()
        Convert the holder/counterparty parameters to broadcaster/countersignatory-organized parameters, given that the holder is the broadcaster. self.is_populated() must be true before calling this function.
      • as_counterparty_broadcastable

        public DirectedChannelTransactionParameters as_counterparty_broadcastable()
        Convert the holder/counterparty parameters to broadcaster/countersignatory-organized parameters, given that the counterparty is the broadcaster. self.is_populated() must be true before calling this function.
      • write

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