| Copyright | (c) 2025 Jared Tobin |
|---|---|
| License | MIT |
| Maintainer | Jared Tobin <jared@ppad.tech> |
| Safe Haskell | None |
| Language | Haskell2010 |
Lightning.Protocol.BOLT2
Description
The peer protocol of the Lightning Network, per BOLT #2: the messages for channel establishment (v1 and v2), interactive transaction construction, quiescence, channel close, normal operation and message retransmission.
Fundamental types (channel ids, points, signatures, amounts, TLV streams) come from ppad-bolt1, transaction ids from ppad-tx, and feature vectors from ppad-bolt9.
Each message has a payload codec, encode_<msg> and
decode_<msg>; encode_message and decode_message handle
complete messages, including the type. Decoders consume the whole
payload: bytes after the fixed fields are the message's TLV stream.
Known TLV records are decoded into typed fields, an unknown even
record fails the decode, and unknown odd records are kept in the
message's _tlvs field, so re-encoding a decoded message reproduces
its bytes.
The examples below assume:
>>>:set -XOverloadedStrings>>>import qualified Data.ByteString as BS>>>import qualified Lightning.Protocol.BOLT1 as BOLT1>>>import Lightning.Protocol.BOLT2>>>let Just cid = BOLT1.channel_id (BS.replicate 32 0xab)
Encode a message, and decode it again:
>>>let fee = UpdateFee cid 2500 BOLT1.empty_tlv_stream>>>let Right wire = encode_message (MsgUpdateFee fee)>>>BS.length wire38>>>decode_message wire == Right (MsgUpdateFee fee)True
Unknown odd TLV records are preserved, and unknown even ones rejected:
>>>let payload = encode_update_fee fee>>>fmap update_fee_tlvs (decode_update_fee (payload <> "\x05\x01\x2a"))Right (TlvStream [TlvRecord {tlv_type = 5, tlv_value = "*"}])>>>decode_update_fee (payload <> "\x04\x01\x2a")Left (DecodeTlvError (TlvUnknownEvenType 4))
Synopsis
- data Message
- = MsgOpenChannel !OpenChannel
- | MsgAcceptChannel !AcceptChannel
- | MsgFundingCreated !FundingCreated
- | MsgFundingSigned !FundingSigned
- | MsgChannelReady !ChannelReady
- | MsgOpenChannel2 !OpenChannel2
- | MsgAcceptChannel2 !AcceptChannel2
- | MsgTxAddInput !TxAddInput
- | MsgTxAddOutput !TxAddOutput
- | MsgTxRemoveInput !TxRemoveInput
- | MsgTxRemoveOutput !TxRemoveOutput
- | MsgTxComplete !TxComplete
- | MsgTxSignatures !TxSignatures
- | MsgTxInitRbf !TxInitRbf
- | MsgTxAckRbf !TxAckRbf
- | MsgTxAbort !TxAbort
- | MsgStfu !Stfu
- | MsgShutdown !Shutdown
- | MsgClosingComplete !ClosingComplete
- | MsgClosingSig !ClosingSig
- | MsgClosingSigned !ClosingSigned
- | MsgUpdateAddHtlc !UpdateAddHtlc
- | MsgUpdateFulfillHtlc !UpdateFulfillHtlc
- | MsgUpdateFailHtlc !UpdateFailHtlc
- | MsgUpdateFailMalformedHtlc !UpdateFailMalformedHtlc
- | MsgCommitmentSigned !CommitmentSigned
- | MsgRevokeAndAck !RevokeAndAck
- | MsgUpdateFee !UpdateFee
- | MsgChannelReestablish !ChannelReestablish
- message_type :: Message -> Word16
- data OpenChannel = OpenChannel {
- open_channel_chain_hash :: !ChainHash
- open_channel_temporary_channel_id :: !ChannelId
- open_channel_funding_satoshis :: !Satoshi
- open_channel_push_msat :: !MilliSatoshi
- open_channel_dust_limit_satoshis :: !Satoshi
- open_channel_max_htlc_value_in_flight_msat :: !Word64
- open_channel_channel_reserve_satoshis :: !Satoshi
- open_channel_htlc_minimum_msat :: !MilliSatoshi
- open_channel_feerate_per_kw :: !Word32
- open_channel_to_self_delay :: !Word16
- open_channel_max_accepted_htlcs :: !Word16
- open_channel_funding_pubkey :: !Point
- open_channel_revocation_basepoint :: !Point
- open_channel_payment_basepoint :: !Point
- open_channel_delayed_payment_basepoint :: !Point
- open_channel_htlc_basepoint :: !Point
- open_channel_first_per_commitment_point :: !Point
- open_channel_channel_flags :: !Word8
- open_channel_upfront_shutdown_script :: !(Maybe ScriptPubKey)
- open_channel_channel_type :: !(Maybe FeatureVector)
- open_channel_tlvs :: !TlvStream
- data AcceptChannel = AcceptChannel {
- accept_channel_temporary_channel_id :: !ChannelId
- accept_channel_dust_limit_satoshis :: !Satoshi
- accept_channel_max_htlc_value_in_flight_msat :: !Word64
- accept_channel_channel_reserve_satoshis :: !Satoshi
- accept_channel_htlc_minimum_msat :: !MilliSatoshi
- accept_channel_minimum_depth :: !Word32
- accept_channel_to_self_delay :: !Word16
- accept_channel_max_accepted_htlcs :: !Word16
- accept_channel_funding_pubkey :: !Point
- accept_channel_revocation_basepoint :: !Point
- accept_channel_payment_basepoint :: !Point
- accept_channel_delayed_payment_basepoint :: !Point
- accept_channel_htlc_basepoint :: !Point
- accept_channel_first_per_commitment_point :: !Point
- accept_channel_upfront_shutdown_script :: !(Maybe ScriptPubKey)
- accept_channel_channel_type :: !(Maybe FeatureVector)
- accept_channel_tlvs :: !TlvStream
- data FundingCreated = FundingCreated {}
- data FundingSigned = FundingSigned {}
- data ChannelReady = ChannelReady {}
- data OpenChannel2 = OpenChannel2 {
- open_channel2_chain_hash :: !ChainHash
- open_channel2_temporary_channel_id :: !ChannelId
- open_channel2_funding_feerate_perkw :: !Word32
- open_channel2_commitment_feerate_perkw :: !Word32
- open_channel2_funding_satoshis :: !Satoshi
- open_channel2_dust_limit_satoshis :: !Satoshi
- open_channel2_max_htlc_value_in_flight_msat :: !Word64
- open_channel2_htlc_minimum_msat :: !MilliSatoshi
- open_channel2_to_self_delay :: !Word16
- open_channel2_max_accepted_htlcs :: !Word16
- open_channel2_locktime :: !Word32
- open_channel2_funding_pubkey :: !Point
- open_channel2_revocation_basepoint :: !Point
- open_channel2_payment_basepoint :: !Point
- open_channel2_delayed_payment_basepoint :: !Point
- open_channel2_htlc_basepoint :: !Point
- open_channel2_first_per_commitment_point :: !Point
- open_channel2_second_per_commitment_point :: !Point
- open_channel2_channel_flags :: !Word8
- open_channel2_upfront_shutdown_script :: !(Maybe ScriptPubKey)
- open_channel2_channel_type :: !(Maybe FeatureVector)
- open_channel2_require_confirmed_inputs :: !Bool
- open_channel2_tlvs :: !TlvStream
- data AcceptChannel2 = AcceptChannel2 {
- accept_channel2_temporary_channel_id :: !ChannelId
- accept_channel2_funding_satoshis :: !Satoshi
- accept_channel2_dust_limit_satoshis :: !Satoshi
- accept_channel2_max_htlc_value_in_flight_msat :: !Word64
- accept_channel2_htlc_minimum_msat :: !MilliSatoshi
- accept_channel2_minimum_depth :: !Word32
- accept_channel2_to_self_delay :: !Word16
- accept_channel2_max_accepted_htlcs :: !Word16
- accept_channel2_funding_pubkey :: !Point
- accept_channel2_revocation_basepoint :: !Point
- accept_channel2_payment_basepoint :: !Point
- accept_channel2_delayed_payment_basepoint :: !Point
- accept_channel2_htlc_basepoint :: !Point
- accept_channel2_first_per_commitment_point :: !Point
- accept_channel2_second_per_commitment_point :: !Point
- accept_channel2_upfront_shutdown_script :: !(Maybe ScriptPubKey)
- accept_channel2_channel_type :: !(Maybe FeatureVector)
- accept_channel2_require_confirmed_inputs :: !Bool
- accept_channel2_tlvs :: !TlvStream
- data TxAddInput = TxAddInput {}
- data TxAddOutput = TxAddOutput {}
- data TxRemoveInput = TxRemoveInput {}
- data TxRemoveOutput = TxRemoveOutput {}
- data TxComplete = TxComplete {}
- data TxSignatures = TxSignatures {}
- data TxInitRbf = TxInitRbf {}
- data TxAckRbf = TxAckRbf {}
- data TxAbort = TxAbort {}
- data Stfu = Stfu {
- stfu_channel_id :: !ChannelId
- stfu_initiator :: !Bool
- stfu_tlvs :: !TlvStream
- data Shutdown = Shutdown {}
- data ClosingComplete = ClosingComplete {
- closing_complete_channel_id :: !ChannelId
- closing_complete_closer_scriptpubkey :: !ScriptPubKey
- closing_complete_closee_scriptpubkey :: !ScriptPubKey
- closing_complete_fee_satoshis :: !Satoshi
- closing_complete_locktime :: !Word32
- closing_complete_closer_output_only :: !(Maybe Signature)
- closing_complete_closee_output_only :: !(Maybe Signature)
- closing_complete_closer_and_closee_outputs :: !(Maybe Signature)
- closing_complete_tlvs :: !TlvStream
- data ClosingSig = ClosingSig {
- closing_sig_channel_id :: !ChannelId
- closing_sig_closer_scriptpubkey :: !ScriptPubKey
- closing_sig_closee_scriptpubkey :: !ScriptPubKey
- closing_sig_fee_satoshis :: !Satoshi
- closing_sig_locktime :: !Word32
- closing_sig_closer_output_only :: !(Maybe Signature)
- closing_sig_closee_output_only :: !(Maybe Signature)
- closing_sig_closer_and_closee_outputs :: !(Maybe Signature)
- closing_sig_tlvs :: !TlvStream
- data ClosingSigned = ClosingSigned {}
- data UpdateAddHtlc = UpdateAddHtlc {
- update_add_htlc_channel_id :: !ChannelId
- update_add_htlc_id :: !HtlcId
- update_add_htlc_amount_msat :: !MilliSatoshi
- update_add_htlc_payment_hash :: !PaymentHash
- update_add_htlc_cltv_expiry :: !Word32
- update_add_htlc_onion_routing_packet :: !OnionRoutingPacket
- update_add_htlc_path_key :: !(Maybe Point)
- update_add_htlc_tlvs :: !TlvStream
- data UpdateFulfillHtlc = UpdateFulfillHtlc {}
- data UpdateFailHtlc = UpdateFailHtlc {}
- data UpdateFailMalformedHtlc = UpdateFailMalformedHtlc {}
- data CommitmentSigned = CommitmentSigned {}
- data RevokeAndAck = RevokeAndAck {}
- data UpdateFee = UpdateFee {}
- data ChannelReestablish = ChannelReestablish {
- channel_reestablish_channel_id :: !ChannelId
- channel_reestablish_next_commitment_number :: !Word64
- channel_reestablish_next_revocation_number :: !Word64
- channel_reestablish_your_last_per_commitment_secret :: !PerCommitmentSecret
- channel_reestablish_my_current_per_commitment_point :: !Point
- channel_reestablish_next_funding :: !(Maybe NextFunding)
- channel_reestablish_tlvs :: !TlvStream
- newtype HtlcId = HtlcId Word64
- newtype SerialId = SerialId Word64
- data ScriptPubKey
- script_pubkey :: ByteString -> Maybe ScriptPubKey
- un_script_pubkey :: ScriptPubKey -> ByteString
- data Witness
- witness :: ByteString -> Maybe Witness
- un_witness :: Witness -> ByteString
- data OnionRoutingPacket
- onion_routing_packet :: ByteString -> Maybe OnionRoutingPacket
- un_onion_routing_packet :: OnionRoutingPacket -> ByteString
- data OnionHash
- onion_hash :: ByteString -> Maybe OnionHash
- un_onion_hash :: OnionHash -> ByteString
- data AttributionData
- attribution_data :: ByteString -> Maybe AttributionData
- un_attribution_data :: AttributionData -> ByteString
- data FeeRange = FeeRange {}
- data NextFunding = NextFunding {}
- encode_message :: Message -> Either EncodeError ByteString
- decode_message :: ByteString -> Either DecodeError Message
- data EncodeError
- data DecodeError
- encode_open_channel :: OpenChannel -> Either EncodeError ByteString
- decode_open_channel :: ByteString -> Either DecodeError OpenChannel
- encode_accept_channel :: AcceptChannel -> Either EncodeError ByteString
- decode_accept_channel :: ByteString -> Either DecodeError AcceptChannel
- encode_funding_created :: FundingCreated -> ByteString
- decode_funding_created :: ByteString -> Either DecodeError FundingCreated
- encode_funding_signed :: FundingSigned -> ByteString
- decode_funding_signed :: ByteString -> Either DecodeError FundingSigned
- encode_channel_ready :: ChannelReady -> Either EncodeError ByteString
- decode_channel_ready :: ByteString -> Either DecodeError ChannelReady
- encode_open_channel2 :: OpenChannel2 -> Either EncodeError ByteString
- decode_open_channel2 :: ByteString -> Either DecodeError OpenChannel2
- encode_accept_channel2 :: AcceptChannel2 -> Either EncodeError ByteString
- decode_accept_channel2 :: ByteString -> Either DecodeError AcceptChannel2
- encode_tx_add_input :: TxAddInput -> Either EncodeError ByteString
- decode_tx_add_input :: ByteString -> Either DecodeError TxAddInput
- encode_tx_add_output :: TxAddOutput -> ByteString
- decode_tx_add_output :: ByteString -> Either DecodeError TxAddOutput
- encode_tx_remove_input :: TxRemoveInput -> ByteString
- decode_tx_remove_input :: ByteString -> Either DecodeError TxRemoveInput
- encode_tx_remove_output :: TxRemoveOutput -> ByteString
- decode_tx_remove_output :: ByteString -> Either DecodeError TxRemoveOutput
- encode_tx_complete :: TxComplete -> ByteString
- decode_tx_complete :: ByteString -> Either DecodeError TxComplete
- encode_tx_signatures :: TxSignatures -> Either EncodeError ByteString
- decode_tx_signatures :: ByteString -> Either DecodeError TxSignatures
- encode_tx_init_rbf :: TxInitRbf -> Either EncodeError ByteString
- decode_tx_init_rbf :: ByteString -> Either DecodeError TxInitRbf
- encode_tx_ack_rbf :: TxAckRbf -> Either EncodeError ByteString
- decode_tx_ack_rbf :: ByteString -> Either DecodeError TxAckRbf
- encode_tx_abort :: TxAbort -> Either EncodeError ByteString
- decode_tx_abort :: ByteString -> Either DecodeError TxAbort
- encode_stfu :: Stfu -> ByteString
- decode_stfu :: ByteString -> Either DecodeError Stfu
- encode_shutdown :: Shutdown -> ByteString
- decode_shutdown :: ByteString -> Either DecodeError Shutdown
- encode_closing_complete :: ClosingComplete -> Either EncodeError ByteString
- decode_closing_complete :: ByteString -> Either DecodeError ClosingComplete
- encode_closing_sig :: ClosingSig -> Either EncodeError ByteString
- decode_closing_sig :: ByteString -> Either DecodeError ClosingSig
- encode_closing_signed :: ClosingSigned -> Either EncodeError ByteString
- decode_closing_signed :: ByteString -> Either DecodeError ClosingSigned
- encode_update_add_htlc :: UpdateAddHtlc -> Either EncodeError ByteString
- decode_update_add_htlc :: ByteString -> Either DecodeError UpdateAddHtlc
- encode_update_fulfill_htlc :: UpdateFulfillHtlc -> Either EncodeError ByteString
- decode_update_fulfill_htlc :: ByteString -> Either DecodeError UpdateFulfillHtlc
- encode_update_fail_htlc :: UpdateFailHtlc -> Either EncodeError ByteString
- decode_update_fail_htlc :: ByteString -> Either DecodeError UpdateFailHtlc
- encode_update_fail_malformed_htlc :: UpdateFailMalformedHtlc -> ByteString
- decode_update_fail_malformed_htlc :: ByteString -> Either DecodeError UpdateFailMalformedHtlc
- encode_commitment_signed :: CommitmentSigned -> Either EncodeError ByteString
- decode_commitment_signed :: ByteString -> Either DecodeError CommitmentSigned
- encode_revoke_and_ack :: RevokeAndAck -> ByteString
- decode_revoke_and_ack :: ByteString -> Either DecodeError RevokeAndAck
- encode_update_fee :: UpdateFee -> ByteString
- decode_update_fee :: ByteString -> Either DecodeError UpdateFee
- encode_channel_reestablish :: ChannelReestablish -> Either EncodeError ByteString
- decode_channel_reestablish :: ByteString -> Either DecodeError ChannelReestablish
Messages
A BOLT #2 message.
Constructors
Instances
message_type :: Message -> Word16 Source #
The wire type of a Message.
>>>message_type (MsgTxComplete (TxComplete cid BOLT1.empty_tlv_stream))70
Channel establishment v1
data OpenChannel Source #
The open_channel message (type 32).
Constructors
| OpenChannel | |
Fields
| |
Instances
| NFData OpenChannel Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: OpenChannel -> () # | |||||
| Generic OpenChannel Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show OpenChannel Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> OpenChannel -> ShowS # show :: OpenChannel -> String # showList :: [OpenChannel] -> ShowS # | |||||
| Eq OpenChannel Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| type Rep OpenChannel Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep OpenChannel = D1 ('MetaData "OpenChannel" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "OpenChannel" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "open_channel_chain_hash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainHash) :*: S1 ('MetaSel ('Just "open_channel_temporary_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId)) :*: (S1 ('MetaSel ('Just "open_channel_funding_satoshis") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi) :*: (S1 ('MetaSel ('Just "open_channel_push_msat") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 MilliSatoshi) :*: S1 ('MetaSel ('Just "open_channel_dust_limit_satoshis") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi)))) :*: ((S1 ('MetaSel ('Just "open_channel_max_htlc_value_in_flight_msat") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "open_channel_channel_reserve_satoshis") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi)) :*: (S1 ('MetaSel ('Just "open_channel_htlc_minimum_msat") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 MilliSatoshi) :*: (S1 ('MetaSel ('Just "open_channel_feerate_per_kw") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "open_channel_to_self_delay") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word16))))) :*: (((S1 ('MetaSel ('Just "open_channel_max_accepted_htlcs") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: S1 ('MetaSel ('Just "open_channel_funding_pubkey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point)) :*: (S1 ('MetaSel ('Just "open_channel_revocation_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: (S1 ('MetaSel ('Just "open_channel_payment_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: S1 ('MetaSel ('Just "open_channel_delayed_payment_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point)))) :*: ((S1 ('MetaSel ('Just "open_channel_htlc_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: (S1 ('MetaSel ('Just "open_channel_first_per_commitment_point") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: S1 ('MetaSel ('Just "open_channel_channel_flags") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word8))) :*: (S1 ('MetaSel ('Just "open_channel_upfront_shutdown_script") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ScriptPubKey)) :*: (S1 ('MetaSel ('Just "open_channel_channel_type") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe FeatureVector)) :*: S1 ('MetaSel ('Just "open_channel_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))))) | |||||
data AcceptChannel Source #
The accept_channel message (type 33).
Constructors
| AcceptChannel | |
Fields
| |
Instances
| NFData AcceptChannel Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: AcceptChannel -> () # | |||||
| Generic AcceptChannel Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show AcceptChannel Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> AcceptChannel -> ShowS # show :: AcceptChannel -> String # showList :: [AcceptChannel] -> ShowS # | |||||
| Eq AcceptChannel Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods (==) :: AcceptChannel -> AcceptChannel -> Bool # (/=) :: AcceptChannel -> AcceptChannel -> Bool # | |||||
| type Rep AcceptChannel Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep AcceptChannel = D1 ('MetaData "AcceptChannel" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "AcceptChannel" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "accept_channel_temporary_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "accept_channel_dust_limit_satoshis") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi)) :*: (S1 ('MetaSel ('Just "accept_channel_max_htlc_value_in_flight_msat") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "accept_channel_channel_reserve_satoshis") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi))) :*: ((S1 ('MetaSel ('Just "accept_channel_htlc_minimum_msat") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 MilliSatoshi) :*: S1 ('MetaSel ('Just "accept_channel_minimum_depth") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32)) :*: (S1 ('MetaSel ('Just "accept_channel_to_self_delay") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: S1 ('MetaSel ('Just "accept_channel_max_accepted_htlcs") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word16)))) :*: (((S1 ('MetaSel ('Just "accept_channel_funding_pubkey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: S1 ('MetaSel ('Just "accept_channel_revocation_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point)) :*: (S1 ('MetaSel ('Just "accept_channel_payment_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: S1 ('MetaSel ('Just "accept_channel_delayed_payment_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point))) :*: ((S1 ('MetaSel ('Just "accept_channel_htlc_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: S1 ('MetaSel ('Just "accept_channel_first_per_commitment_point") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point)) :*: (S1 ('MetaSel ('Just "accept_channel_upfront_shutdown_script") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ScriptPubKey)) :*: (S1 ('MetaSel ('Just "accept_channel_channel_type") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe FeatureVector)) :*: S1 ('MetaSel ('Just "accept_channel_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))))) | |||||
data FundingCreated Source #
The funding_created message (type 34).
Constructors
| FundingCreated | |
Fields
| |
Instances
| NFData FundingCreated Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: FundingCreated -> () # | |||||
| Generic FundingCreated Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
Methods from :: FundingCreated -> Rep FundingCreated x # to :: Rep FundingCreated x -> FundingCreated # | |||||
| Show FundingCreated Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> FundingCreated -> ShowS # show :: FundingCreated -> String # showList :: [FundingCreated] -> ShowS # | |||||
| Eq FundingCreated Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods (==) :: FundingCreated -> FundingCreated -> Bool # (/=) :: FundingCreated -> FundingCreated -> Bool # | |||||
| type Rep FundingCreated Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep FundingCreated = D1 ('MetaData "FundingCreated" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "FundingCreated" 'PrefixI 'True) ((S1 ('MetaSel ('Just "funding_created_temporary_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "funding_created_funding_txid") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxId)) :*: (S1 ('MetaSel ('Just "funding_created_funding_output_index") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: (S1 ('MetaSel ('Just "funding_created_signature") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Signature) :*: S1 ('MetaSel ('Just "funding_created_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))) | |||||
data FundingSigned Source #
The funding_signed message (type 35).
Constructors
| FundingSigned | |
Fields
| |
Instances
| NFData FundingSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: FundingSigned -> () # | |||||
| Generic FundingSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show FundingSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> FundingSigned -> ShowS # show :: FundingSigned -> String # showList :: [FundingSigned] -> ShowS # | |||||
| Eq FundingSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods (==) :: FundingSigned -> FundingSigned -> Bool # (/=) :: FundingSigned -> FundingSigned -> Bool # | |||||
| type Rep FundingSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep FundingSigned = D1 ('MetaData "FundingSigned" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "FundingSigned" 'PrefixI 'True) (S1 ('MetaSel ('Just "funding_signed_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: (S1 ('MetaSel ('Just "funding_signed_signature") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Signature) :*: S1 ('MetaSel ('Just "funding_signed_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream)))) | |||||
data ChannelReady Source #
The channel_ready message (type 36).
Constructors
| ChannelReady | |
Fields
| |
Instances
| NFData ChannelReady Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: ChannelReady -> () # | |||||
| Generic ChannelReady Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show ChannelReady Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> ChannelReady -> ShowS # show :: ChannelReady -> String # showList :: [ChannelReady] -> ShowS # | |||||
| Eq ChannelReady Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| type Rep ChannelReady Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep ChannelReady = D1 ('MetaData "ChannelReady" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "ChannelReady" 'PrefixI 'True) ((S1 ('MetaSel ('Just "channel_ready_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "channel_ready_second_per_commitment_point") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point)) :*: (S1 ('MetaSel ('Just "channel_ready_alias") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ShortChannelId)) :*: S1 ('MetaSel ('Just "channel_ready_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream)))) | |||||
Channel establishment v2
data OpenChannel2 Source #
The open_channel2 message (type 64).
Constructors
| OpenChannel2 | |
Fields
| |
Instances
| NFData OpenChannel2 Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: OpenChannel2 -> () # | |||||
| Generic OpenChannel2 Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show OpenChannel2 Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> OpenChannel2 -> ShowS # show :: OpenChannel2 -> String # showList :: [OpenChannel2] -> ShowS # | |||||
| Eq OpenChannel2 Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| type Rep OpenChannel2 Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep OpenChannel2 = D1 ('MetaData "OpenChannel2" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "OpenChannel2" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "open_channel2_chain_hash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainHash) :*: S1 ('MetaSel ('Just "open_channel2_temporary_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId)) :*: (S1 ('MetaSel ('Just "open_channel2_funding_feerate_perkw") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: (S1 ('MetaSel ('Just "open_channel2_commitment_feerate_perkw") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "open_channel2_funding_satoshis") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi)))) :*: ((S1 ('MetaSel ('Just "open_channel2_dust_limit_satoshis") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi) :*: (S1 ('MetaSel ('Just "open_channel2_max_htlc_value_in_flight_msat") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "open_channel2_htlc_minimum_msat") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 MilliSatoshi))) :*: (S1 ('MetaSel ('Just "open_channel2_to_self_delay") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: (S1 ('MetaSel ('Just "open_channel2_max_accepted_htlcs") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: S1 ('MetaSel ('Just "open_channel2_locktime") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32))))) :*: (((S1 ('MetaSel ('Just "open_channel2_funding_pubkey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: (S1 ('MetaSel ('Just "open_channel2_revocation_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: S1 ('MetaSel ('Just "open_channel2_payment_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point))) :*: (S1 ('MetaSel ('Just "open_channel2_delayed_payment_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: (S1 ('MetaSel ('Just "open_channel2_htlc_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: S1 ('MetaSel ('Just "open_channel2_first_per_commitment_point") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point)))) :*: ((S1 ('MetaSel ('Just "open_channel2_second_per_commitment_point") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: (S1 ('MetaSel ('Just "open_channel2_channel_flags") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "open_channel2_upfront_shutdown_script") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ScriptPubKey)))) :*: (S1 ('MetaSel ('Just "open_channel2_channel_type") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe FeatureVector)) :*: (S1 ('MetaSel ('Just "open_channel2_require_confirmed_inputs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "open_channel2_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))))) | |||||
data AcceptChannel2 Source #
The accept_channel2 message (type 65).
Constructors
| AcceptChannel2 | |
Fields
| |
Instances
| NFData AcceptChannel2 Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: AcceptChannel2 -> () # | |||||
| Generic AcceptChannel2 Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
Methods from :: AcceptChannel2 -> Rep AcceptChannel2 x # to :: Rep AcceptChannel2 x -> AcceptChannel2 # | |||||
| Show AcceptChannel2 Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> AcceptChannel2 -> ShowS # show :: AcceptChannel2 -> String # showList :: [AcceptChannel2] -> ShowS # | |||||
| Eq AcceptChannel2 Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods (==) :: AcceptChannel2 -> AcceptChannel2 -> Bool # (/=) :: AcceptChannel2 -> AcceptChannel2 -> Bool # | |||||
| type Rep AcceptChannel2 Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep AcceptChannel2 = D1 ('MetaData "AcceptChannel2" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "AcceptChannel2" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "accept_channel2_temporary_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "accept_channel2_funding_satoshis") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi)) :*: (S1 ('MetaSel ('Just "accept_channel2_dust_limit_satoshis") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi) :*: S1 ('MetaSel ('Just "accept_channel2_max_htlc_value_in_flight_msat") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word64))) :*: ((S1 ('MetaSel ('Just "accept_channel2_htlc_minimum_msat") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 MilliSatoshi) :*: S1 ('MetaSel ('Just "accept_channel2_minimum_depth") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32)) :*: (S1 ('MetaSel ('Just "accept_channel2_to_self_delay") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: (S1 ('MetaSel ('Just "accept_channel2_max_accepted_htlcs") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: S1 ('MetaSel ('Just "accept_channel2_funding_pubkey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point))))) :*: (((S1 ('MetaSel ('Just "accept_channel2_revocation_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: S1 ('MetaSel ('Just "accept_channel2_payment_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point)) :*: (S1 ('MetaSel ('Just "accept_channel2_delayed_payment_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: (S1 ('MetaSel ('Just "accept_channel2_htlc_basepoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: S1 ('MetaSel ('Just "accept_channel2_first_per_commitment_point") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point)))) :*: ((S1 ('MetaSel ('Just "accept_channel2_second_per_commitment_point") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: S1 ('MetaSel ('Just "accept_channel2_upfront_shutdown_script") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ScriptPubKey))) :*: (S1 ('MetaSel ('Just "accept_channel2_channel_type") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe FeatureVector)) :*: (S1 ('MetaSel ('Just "accept_channel2_require_confirmed_inputs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "accept_channel2_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))))) | |||||
Interactive transaction construction
data TxAddInput Source #
The tx_add_input message (type 66).
Constructors
| TxAddInput | |
Fields
| |
Instances
| NFData TxAddInput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: TxAddInput -> () # | |||||
| Generic TxAddInput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show TxAddInput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> TxAddInput -> ShowS # show :: TxAddInput -> String # showList :: [TxAddInput] -> ShowS # | |||||
| Eq TxAddInput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| type Rep TxAddInput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep TxAddInput = D1 ('MetaData "TxAddInput" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "TxAddInput" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tx_add_input_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: (S1 ('MetaSel ('Just "tx_add_input_serial_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SerialId) :*: S1 ('MetaSel ('Just "tx_add_input_prevtx") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString))) :*: (S1 ('MetaSel ('Just "tx_add_input_prevtx_vout") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: (S1 ('MetaSel ('Just "tx_add_input_sequence") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "tx_add_input_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))) | |||||
data TxAddOutput Source #
The tx_add_output message (type 67).
Constructors
| TxAddOutput | |
Fields
| |
Instances
| NFData TxAddOutput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: TxAddOutput -> () # | |||||
| Generic TxAddOutput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show TxAddOutput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> TxAddOutput -> ShowS # show :: TxAddOutput -> String # showList :: [TxAddOutput] -> ShowS # | |||||
| Eq TxAddOutput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| type Rep TxAddOutput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep TxAddOutput = D1 ('MetaData "TxAddOutput" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "TxAddOutput" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tx_add_output_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "tx_add_output_serial_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SerialId)) :*: (S1 ('MetaSel ('Just "tx_add_output_sats") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi) :*: (S1 ('MetaSel ('Just "tx_add_output_script") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ScriptPubKey) :*: S1 ('MetaSel ('Just "tx_add_output_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))) | |||||
data TxRemoveInput Source #
The tx_remove_input message (type 68).
Constructors
| TxRemoveInput | |
Fields
| |
Instances
| NFData TxRemoveInput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: TxRemoveInput -> () # | |||||
| Generic TxRemoveInput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show TxRemoveInput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> TxRemoveInput -> ShowS # show :: TxRemoveInput -> String # showList :: [TxRemoveInput] -> ShowS # | |||||
| Eq TxRemoveInput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods (==) :: TxRemoveInput -> TxRemoveInput -> Bool # (/=) :: TxRemoveInput -> TxRemoveInput -> Bool # | |||||
| type Rep TxRemoveInput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep TxRemoveInput = D1 ('MetaData "TxRemoveInput" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "TxRemoveInput" 'PrefixI 'True) (S1 ('MetaSel ('Just "tx_remove_input_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: (S1 ('MetaSel ('Just "tx_remove_input_serial_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SerialId) :*: S1 ('MetaSel ('Just "tx_remove_input_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream)))) | |||||
data TxRemoveOutput Source #
The tx_remove_output message (type 69).
Constructors
| TxRemoveOutput | |
Fields
| |
Instances
| NFData TxRemoveOutput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: TxRemoveOutput -> () # | |||||
| Generic TxRemoveOutput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
Methods from :: TxRemoveOutput -> Rep TxRemoveOutput x # to :: Rep TxRemoveOutput x -> TxRemoveOutput # | |||||
| Show TxRemoveOutput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> TxRemoveOutput -> ShowS # show :: TxRemoveOutput -> String # showList :: [TxRemoveOutput] -> ShowS # | |||||
| Eq TxRemoveOutput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods (==) :: TxRemoveOutput -> TxRemoveOutput -> Bool # (/=) :: TxRemoveOutput -> TxRemoveOutput -> Bool # | |||||
| type Rep TxRemoveOutput Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep TxRemoveOutput = D1 ('MetaData "TxRemoveOutput" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "TxRemoveOutput" 'PrefixI 'True) (S1 ('MetaSel ('Just "tx_remove_output_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: (S1 ('MetaSel ('Just "tx_remove_output_serial_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SerialId) :*: S1 ('MetaSel ('Just "tx_remove_output_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream)))) | |||||
data TxComplete Source #
The tx_complete message (type 70).
Constructors
| TxComplete | |
Fields
| |
Instances
| NFData TxComplete Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: TxComplete -> () # | |||||
| Generic TxComplete Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show TxComplete Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> TxComplete -> ShowS # show :: TxComplete -> String # showList :: [TxComplete] -> ShowS # | |||||
| Eq TxComplete Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| type Rep TxComplete Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep TxComplete = D1 ('MetaData "TxComplete" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "TxComplete" 'PrefixI 'True) (S1 ('MetaSel ('Just "tx_complete_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "tx_complete_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))) | |||||
data TxSignatures Source #
The tx_signatures message (type 71).
Constructors
| TxSignatures | |
Fields
| |
Instances
| NFData TxSignatures Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: TxSignatures -> () # | |||||
| Generic TxSignatures Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show TxSignatures Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> TxSignatures -> ShowS # show :: TxSignatures -> String # showList :: [TxSignatures] -> ShowS # | |||||
| Eq TxSignatures Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| type Rep TxSignatures Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep TxSignatures = D1 ('MetaData "TxSignatures" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "TxSignatures" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tx_signatures_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "tx_signatures_txid") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxId)) :*: (S1 ('MetaSel ('Just "tx_signatures_witnesses") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Witness]) :*: S1 ('MetaSel ('Just "tx_signatures_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream)))) | |||||
The tx_init_rbf message (type 72).
Constructors
| TxInitRbf | |
Fields
| |
Instances
| NFData TxInitRbf Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| Generic TxInitRbf Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show TxInitRbf Source # | |||||
| Eq TxInitRbf Source # | |||||
| type Rep TxInitRbf Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep TxInitRbf = D1 ('MetaData "TxInitRbf" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "TxInitRbf" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tx_init_rbf_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: (S1 ('MetaSel ('Just "tx_init_rbf_locktime") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "tx_init_rbf_feerate") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32))) :*: (S1 ('MetaSel ('Just "tx_init_rbf_funding_output_contribution") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Int64)) :*: (S1 ('MetaSel ('Just "tx_init_rbf_require_confirmed_inputs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "tx_init_rbf_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))) | |||||
The tx_ack_rbf message (type 73).
Constructors
| TxAckRbf | |
Fields
| |
Instances
| NFData TxAckRbf Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| Generic TxAckRbf Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show TxAckRbf Source # | |||||
| Eq TxAckRbf Source # | |||||
| type Rep TxAckRbf Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep TxAckRbf = D1 ('MetaData "TxAckRbf" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "TxAckRbf" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tx_ack_rbf_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "tx_ack_rbf_funding_output_contribution") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Int64))) :*: (S1 ('MetaSel ('Just "tx_ack_rbf_require_confirmed_inputs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "tx_ack_rbf_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream)))) | |||||
The tx_abort message (type 74).
Constructors
| TxAbort | |
Fields
| |
Instances
| NFData TxAbort Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| Generic TxAbort Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show TxAbort Source # | |||||
| Eq TxAbort Source # | |||||
| type Rep TxAbort Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep TxAbort = D1 ('MetaData "TxAbort" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "TxAbort" 'PrefixI 'True) (S1 ('MetaSel ('Just "tx_abort_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: (S1 ('MetaSel ('Just "tx_abort_data") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString) :*: S1 ('MetaSel ('Just "tx_abort_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream)))) | |||||
Channel quiescence
The stfu message (type 2).
Constructors
| Stfu | |
Fields
| |
Instances
| NFData Stfu Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| Generic Stfu Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show Stfu Source # | |||||
| Eq Stfu Source # | |||||
| type Rep Stfu Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep Stfu = D1 ('MetaData "Stfu" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "Stfu" 'PrefixI 'True) (S1 ('MetaSel ('Just "stfu_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: (S1 ('MetaSel ('Just "stfu_initiator") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "stfu_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream)))) | |||||
Channel close
The shutdown message (type 38).
Constructors
| Shutdown | |
Fields
| |
Instances
| NFData Shutdown Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| Generic Shutdown Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show Shutdown Source # | |||||
| Eq Shutdown Source # | |||||
| type Rep Shutdown Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep Shutdown = D1 ('MetaData "Shutdown" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "Shutdown" 'PrefixI 'True) (S1 ('MetaSel ('Just "shutdown_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: (S1 ('MetaSel ('Just "shutdown_scriptpubkey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ScriptPubKey) :*: S1 ('MetaSel ('Just "shutdown_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream)))) | |||||
data ClosingComplete Source #
The closing_complete message (type 40).
Constructors
| ClosingComplete | |
Fields
| |
Instances
| NFData ClosingComplete Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: ClosingComplete -> () # | |||||
| Generic ClosingComplete Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
Methods from :: ClosingComplete -> Rep ClosingComplete x # to :: Rep ClosingComplete x -> ClosingComplete # | |||||
| Show ClosingComplete Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> ClosingComplete -> ShowS # show :: ClosingComplete -> String # showList :: [ClosingComplete] -> ShowS # | |||||
| Eq ClosingComplete Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods (==) :: ClosingComplete -> ClosingComplete -> Bool # (/=) :: ClosingComplete -> ClosingComplete -> Bool # | |||||
| type Rep ClosingComplete Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep ClosingComplete = D1 ('MetaData "ClosingComplete" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "ClosingComplete" 'PrefixI 'True) (((S1 ('MetaSel ('Just "closing_complete_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "closing_complete_closer_scriptpubkey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ScriptPubKey)) :*: (S1 ('MetaSel ('Just "closing_complete_closee_scriptpubkey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ScriptPubKey) :*: S1 ('MetaSel ('Just "closing_complete_fee_satoshis") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi))) :*: ((S1 ('MetaSel ('Just "closing_complete_locktime") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "closing_complete_closer_output_only") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Signature))) :*: (S1 ('MetaSel ('Just "closing_complete_closee_output_only") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Signature)) :*: (S1 ('MetaSel ('Just "closing_complete_closer_and_closee_outputs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Signature)) :*: S1 ('MetaSel ('Just "closing_complete_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream)))))) | |||||
data ClosingSig Source #
The closing_sig message (type 41). A valid closing_sig carries
exactly one signature, in a field set in the closing_complete it
answers; checking that is left to the caller.
Constructors
| ClosingSig | |
Fields
| |
Instances
| NFData ClosingSig Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: ClosingSig -> () # | |||||
| Generic ClosingSig Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show ClosingSig Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> ClosingSig -> ShowS # show :: ClosingSig -> String # showList :: [ClosingSig] -> ShowS # | |||||
| Eq ClosingSig Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| type Rep ClosingSig Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep ClosingSig = D1 ('MetaData "ClosingSig" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "ClosingSig" 'PrefixI 'True) (((S1 ('MetaSel ('Just "closing_sig_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "closing_sig_closer_scriptpubkey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ScriptPubKey)) :*: (S1 ('MetaSel ('Just "closing_sig_closee_scriptpubkey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ScriptPubKey) :*: S1 ('MetaSel ('Just "closing_sig_fee_satoshis") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi))) :*: ((S1 ('MetaSel ('Just "closing_sig_locktime") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "closing_sig_closer_output_only") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Signature))) :*: (S1 ('MetaSel ('Just "closing_sig_closee_output_only") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Signature)) :*: (S1 ('MetaSel ('Just "closing_sig_closer_and_closee_outputs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Signature)) :*: S1 ('MetaSel ('Just "closing_sig_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream)))))) | |||||
data ClosingSigned Source #
The legacy closing_signed message (type 39), used when
option_simple_close is not negotiated.
Constructors
| ClosingSigned | |
Fields
| |
Instances
| NFData ClosingSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: ClosingSigned -> () # | |||||
| Generic ClosingSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show ClosingSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> ClosingSigned -> ShowS # show :: ClosingSigned -> String # showList :: [ClosingSigned] -> ShowS # | |||||
| Eq ClosingSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods (==) :: ClosingSigned -> ClosingSigned -> Bool # (/=) :: ClosingSigned -> ClosingSigned -> Bool # | |||||
| type Rep ClosingSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep ClosingSigned = D1 ('MetaData "ClosingSigned" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "ClosingSigned" 'PrefixI 'True) ((S1 ('MetaSel ('Just "closing_signed_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "closing_signed_fee_satoshis") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi)) :*: (S1 ('MetaSel ('Just "closing_signed_signature") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Signature) :*: (S1 ('MetaSel ('Just "closing_signed_fee_range") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe FeeRange)) :*: S1 ('MetaSel ('Just "closing_signed_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))) | |||||
Normal operation
data UpdateAddHtlc Source #
The update_add_htlc message (type 128).
Constructors
| UpdateAddHtlc | |
Fields
| |
Instances
| NFData UpdateAddHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: UpdateAddHtlc -> () # | |||||
| Generic UpdateAddHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show UpdateAddHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> UpdateAddHtlc -> ShowS # show :: UpdateAddHtlc -> String # showList :: [UpdateAddHtlc] -> ShowS # | |||||
| Eq UpdateAddHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods (==) :: UpdateAddHtlc -> UpdateAddHtlc -> Bool # (/=) :: UpdateAddHtlc -> UpdateAddHtlc -> Bool # | |||||
| type Rep UpdateAddHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep UpdateAddHtlc = D1 ('MetaData "UpdateAddHtlc" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "UpdateAddHtlc" 'PrefixI 'True) (((S1 ('MetaSel ('Just "update_add_htlc_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "update_add_htlc_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HtlcId)) :*: (S1 ('MetaSel ('Just "update_add_htlc_amount_msat") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 MilliSatoshi) :*: S1 ('MetaSel ('Just "update_add_htlc_payment_hash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PaymentHash))) :*: ((S1 ('MetaSel ('Just "update_add_htlc_cltv_expiry") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "update_add_htlc_onion_routing_packet") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OnionRoutingPacket)) :*: (S1 ('MetaSel ('Just "update_add_htlc_path_key") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Point)) :*: S1 ('MetaSel ('Just "update_add_htlc_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))) | |||||
data UpdateFulfillHtlc Source #
The update_fulfill_htlc message (type 130).
Constructors
| UpdateFulfillHtlc | |
Fields
| |
Instances
| NFData UpdateFulfillHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: UpdateFulfillHtlc -> () # | |||||
| Generic UpdateFulfillHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
Methods from :: UpdateFulfillHtlc -> Rep UpdateFulfillHtlc x # to :: Rep UpdateFulfillHtlc x -> UpdateFulfillHtlc # | |||||
| Show UpdateFulfillHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> UpdateFulfillHtlc -> ShowS # show :: UpdateFulfillHtlc -> String # showList :: [UpdateFulfillHtlc] -> ShowS # | |||||
| Eq UpdateFulfillHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods (==) :: UpdateFulfillHtlc -> UpdateFulfillHtlc -> Bool # (/=) :: UpdateFulfillHtlc -> UpdateFulfillHtlc -> Bool # | |||||
| type Rep UpdateFulfillHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep UpdateFulfillHtlc = D1 ('MetaData "UpdateFulfillHtlc" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "UpdateFulfillHtlc" 'PrefixI 'True) ((S1 ('MetaSel ('Just "update_fulfill_htlc_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: (S1 ('MetaSel ('Just "update_fulfill_htlc_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HtlcId) :*: S1 ('MetaSel ('Just "update_fulfill_htlc_payment_preimage") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PaymentPreimage))) :*: (S1 ('MetaSel ('Just "update_fulfill_htlc_attribution_data") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe AttributionData)) :*: (S1 ('MetaSel ('Just "update_fulfill_htlc_fulfillment_payload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ByteString)) :*: S1 ('MetaSel ('Just "update_fulfill_htlc_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))) | |||||
data UpdateFailHtlc Source #
The update_fail_htlc message (type 131).
Constructors
| UpdateFailHtlc | |
Fields
| |
Instances
| NFData UpdateFailHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: UpdateFailHtlc -> () # | |||||
| Generic UpdateFailHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
Methods from :: UpdateFailHtlc -> Rep UpdateFailHtlc x # to :: Rep UpdateFailHtlc x -> UpdateFailHtlc # | |||||
| Show UpdateFailHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> UpdateFailHtlc -> ShowS # show :: UpdateFailHtlc -> String # showList :: [UpdateFailHtlc] -> ShowS # | |||||
| Eq UpdateFailHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods (==) :: UpdateFailHtlc -> UpdateFailHtlc -> Bool # (/=) :: UpdateFailHtlc -> UpdateFailHtlc -> Bool # | |||||
| type Rep UpdateFailHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep UpdateFailHtlc = D1 ('MetaData "UpdateFailHtlc" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "UpdateFailHtlc" 'PrefixI 'True) ((S1 ('MetaSel ('Just "update_fail_htlc_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "update_fail_htlc_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HtlcId)) :*: (S1 ('MetaSel ('Just "update_fail_htlc_reason") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString) :*: (S1 ('MetaSel ('Just "update_fail_htlc_attribution_data") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe AttributionData)) :*: S1 ('MetaSel ('Just "update_fail_htlc_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))) | |||||
data UpdateFailMalformedHtlc Source #
The update_fail_malformed_htlc message (type 135).
Constructors
| UpdateFailMalformedHtlc | |
Instances
| NFData UpdateFailMalformedHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: UpdateFailMalformedHtlc -> () # | |||||
| Generic UpdateFailMalformedHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
Methods from :: UpdateFailMalformedHtlc -> Rep UpdateFailMalformedHtlc x # to :: Rep UpdateFailMalformedHtlc x -> UpdateFailMalformedHtlc # | |||||
| Show UpdateFailMalformedHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> UpdateFailMalformedHtlc -> ShowS # show :: UpdateFailMalformedHtlc -> String # showList :: [UpdateFailMalformedHtlc] -> ShowS # | |||||
| Eq UpdateFailMalformedHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods (==) :: UpdateFailMalformedHtlc -> UpdateFailMalformedHtlc -> Bool # (/=) :: UpdateFailMalformedHtlc -> UpdateFailMalformedHtlc -> Bool # | |||||
| type Rep UpdateFailMalformedHtlc Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep UpdateFailMalformedHtlc = D1 ('MetaData "UpdateFailMalformedHtlc" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "UpdateFailMalformedHtlc" 'PrefixI 'True) ((S1 ('MetaSel ('Just "update_fail_malformed_htlc_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "update_fail_malformed_htlc_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HtlcId)) :*: (S1 ('MetaSel ('Just "update_fail_malformed_htlc_sha256_of_onion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OnionHash) :*: (S1 ('MetaSel ('Just "update_fail_malformed_htlc_failure_code") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: S1 ('MetaSel ('Just "update_fail_malformed_htlc_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))) | |||||
data CommitmentSigned Source #
The commitment_signed message (type 132).
Constructors
| CommitmentSigned | |
Fields
| |
Instances
| NFData CommitmentSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: CommitmentSigned -> () # | |||||
| Generic CommitmentSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
Methods from :: CommitmentSigned -> Rep CommitmentSigned x # to :: Rep CommitmentSigned x -> CommitmentSigned # | |||||
| Show CommitmentSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> CommitmentSigned -> ShowS # show :: CommitmentSigned -> String # showList :: [CommitmentSigned] -> ShowS # | |||||
| Eq CommitmentSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods (==) :: CommitmentSigned -> CommitmentSigned -> Bool # (/=) :: CommitmentSigned -> CommitmentSigned -> Bool # | |||||
| type Rep CommitmentSigned Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep CommitmentSigned = D1 ('MetaData "CommitmentSigned" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "CommitmentSigned" 'PrefixI 'True) ((S1 ('MetaSel ('Just "commitment_signed_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "commitment_signed_signature") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Signature)) :*: (S1 ('MetaSel ('Just "commitment_signed_htlc_signatures") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Signature]) :*: (S1 ('MetaSel ('Just "commitment_signed_funding_txid") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe TxId)) :*: S1 ('MetaSel ('Just "commitment_signed_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))) | |||||
data RevokeAndAck Source #
The revoke_and_ack message (type 133).
Constructors
| RevokeAndAck | |
Fields
| |
Instances
| NFData RevokeAndAck Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: RevokeAndAck -> () # | |||||
| Generic RevokeAndAck Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show RevokeAndAck Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> RevokeAndAck -> ShowS # show :: RevokeAndAck -> String # showList :: [RevokeAndAck] -> ShowS # | |||||
| Eq RevokeAndAck Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| type Rep RevokeAndAck Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep RevokeAndAck = D1 ('MetaData "RevokeAndAck" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "RevokeAndAck" 'PrefixI 'True) ((S1 ('MetaSel ('Just "revoke_and_ack_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: S1 ('MetaSel ('Just "revoke_and_ack_per_commitment_secret") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PerCommitmentSecret)) :*: (S1 ('MetaSel ('Just "revoke_and_ack_next_per_commitment_point") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point) :*: S1 ('MetaSel ('Just "revoke_and_ack_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream)))) | |||||
The update_fee message (type 134).
Constructors
| UpdateFee | |
Fields
| |
Instances
| NFData UpdateFee Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages | |||||
| Generic UpdateFee Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
| |||||
| Show UpdateFee Source # | |||||
| Eq UpdateFee Source # | |||||
| type Rep UpdateFee Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep UpdateFee = D1 ('MetaData "UpdateFee" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "UpdateFee" 'PrefixI 'True) (S1 ('MetaSel ('Just "update_fee_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: (S1 ('MetaSel ('Just "update_fee_feerate_per_kw") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "update_fee_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream)))) | |||||
Message retransmission
data ChannelReestablish Source #
The channel_reestablish message (type 136).
Constructors
| ChannelReestablish | |
Fields
| |
Instances
| NFData ChannelReestablish Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods rnf :: ChannelReestablish -> () # | |||||
| Generic ChannelReestablish Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Associated Types
Methods from :: ChannelReestablish -> Rep ChannelReestablish x # to :: Rep ChannelReestablish x -> ChannelReestablish # | |||||
| Show ChannelReestablish Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods showsPrec :: Int -> ChannelReestablish -> ShowS # show :: ChannelReestablish -> String # showList :: [ChannelReestablish] -> ShowS # | |||||
| Eq ChannelReestablish Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages Methods (==) :: ChannelReestablish -> ChannelReestablish -> Bool # (/=) :: ChannelReestablish -> ChannelReestablish -> Bool # | |||||
| type Rep ChannelReestablish Source # | |||||
Defined in Lightning.Protocol.BOLT2.Messages type Rep ChannelReestablish = D1 ('MetaData "ChannelReestablish" "Lightning.Protocol.BOLT2.Messages" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "ChannelReestablish" 'PrefixI 'True) ((S1 ('MetaSel ('Just "channel_reestablish_channel_id") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChannelId) :*: (S1 ('MetaSel ('Just "channel_reestablish_next_commitment_number") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "channel_reestablish_next_revocation_number") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word64))) :*: ((S1 ('MetaSel ('Just "channel_reestablish_your_last_per_commitment_secret") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PerCommitmentSecret) :*: S1 ('MetaSel ('Just "channel_reestablish_my_current_per_commitment_point") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Point)) :*: (S1 ('MetaSel ('Just "channel_reestablish_next_funding") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe NextFunding)) :*: S1 ('MetaSel ('Just "channel_reestablish_tlvs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvStream))))) | |||||
Field types
An HTLC identifier (the id field of the HTLC messages). The
offerer numbers its HTLCs from 0, incrementing by 1.
Instances
| NFData HtlcId Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types | |||||
| Generic HtlcId Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Associated Types
| |||||
| Show HtlcId Source # | |||||
| Eq HtlcId Source # | |||||
| Ord HtlcId Source # | |||||
| type Rep HtlcId Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types | |||||
The serial_id of an input or output in interactive transaction
construction. The initiator sends even values, the non-initiator
odd ones.
Instances
| NFData SerialId Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types | |||||
| Generic SerialId Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Associated Types
| |||||
| Show SerialId Source # | |||||
| Eq SerialId Source # | |||||
| Ord SerialId Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types | |||||
| type Rep SerialId Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types | |||||
data ScriptPubKey Source #
A scriptPubKey, at most 65535 bytes (the most a u16 length prefix can describe).
Instances
| NFData ScriptPubKey Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Methods rnf :: ScriptPubKey -> () # | |||||
| Generic ScriptPubKey Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Associated Types
| |||||
| Show ScriptPubKey Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Methods showsPrec :: Int -> ScriptPubKey -> ShowS # show :: ScriptPubKey -> String # showList :: [ScriptPubKey] -> ShowS # | |||||
| Eq ScriptPubKey Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types | |||||
| Ord ScriptPubKey Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Methods compare :: ScriptPubKey -> ScriptPubKey -> Ordering # (<) :: ScriptPubKey -> ScriptPubKey -> Bool # (<=) :: ScriptPubKey -> ScriptPubKey -> Bool # (>) :: ScriptPubKey -> ScriptPubKey -> Bool # (>=) :: ScriptPubKey -> ScriptPubKey -> Bool # max :: ScriptPubKey -> ScriptPubKey -> ScriptPubKey # min :: ScriptPubKey -> ScriptPubKey -> ScriptPubKey # | |||||
| type Rep ScriptPubKey Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types type Rep ScriptPubKey = D1 ('MetaData "ScriptPubKey" "Lightning.Protocol.BOLT2.Types" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'True) (C1 ('MetaCons "ScriptPubKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
script_pubkey :: ByteString -> Maybe ScriptPubKey Source #
Construct a ScriptPubKey, failing above 65535 bytes. The script
itself isn't checked; the forms acceptable in shutdown depend on
negotiated features.
>>>script_pubkey "\x51\x02\x4e\x73"Just (ScriptPubKey "Q\STXNs")>>>script_pubkey (BS.replicate 65536 0x00)Nothing
un_script_pubkey :: ScriptPubKey -> ByteString Source #
The bytes of a ScriptPubKey.
The serialized witness of one input in tx_signatures (encoded as
in Bitcoin's wire protocol), at most 65535 bytes.
Instances
| NFData Witness Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types | |||||
| Generic Witness Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Associated Types
| |||||
| Show Witness Source # | |||||
| Eq Witness Source # | |||||
| Ord Witness Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types | |||||
| type Rep Witness Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types type Rep Witness = D1 ('MetaData "Witness" "Lightning.Protocol.BOLT2.Types" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'True) (C1 ('MetaCons "Witness" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
witness :: ByteString -> Maybe Witness Source #
Construct a Witness, failing above 65535 bytes. The contents
aren't checked.
>>>witness "\x01\x01\x2a"Just (Witness "\SOH\SOH*")
un_witness :: Witness -> ByteString Source #
The bytes of a Witness.
data OnionRoutingPacket Source #
The 1366-byte onion_routing_packet of update_add_htlc, kept
opaque (BOLT #4 defines its structure).
Instances
| NFData OnionRoutingPacket Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Methods rnf :: OnionRoutingPacket -> () # | |||||
| Generic OnionRoutingPacket Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Associated Types
Methods from :: OnionRoutingPacket -> Rep OnionRoutingPacket x # to :: Rep OnionRoutingPacket x -> OnionRoutingPacket # | |||||
| Show OnionRoutingPacket Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Methods showsPrec :: Int -> OnionRoutingPacket -> ShowS # show :: OnionRoutingPacket -> String # showList :: [OnionRoutingPacket] -> ShowS # | |||||
| Eq OnionRoutingPacket Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Methods (==) :: OnionRoutingPacket -> OnionRoutingPacket -> Bool # (/=) :: OnionRoutingPacket -> OnionRoutingPacket -> Bool # | |||||
| Ord OnionRoutingPacket Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Methods compare :: OnionRoutingPacket -> OnionRoutingPacket -> Ordering # (<) :: OnionRoutingPacket -> OnionRoutingPacket -> Bool # (<=) :: OnionRoutingPacket -> OnionRoutingPacket -> Bool # (>) :: OnionRoutingPacket -> OnionRoutingPacket -> Bool # (>=) :: OnionRoutingPacket -> OnionRoutingPacket -> Bool # max :: OnionRoutingPacket -> OnionRoutingPacket -> OnionRoutingPacket # min :: OnionRoutingPacket -> OnionRoutingPacket -> OnionRoutingPacket # | |||||
| type Rep OnionRoutingPacket Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types type Rep OnionRoutingPacket = D1 ('MetaData "OnionRoutingPacket" "Lightning.Protocol.BOLT2.Types" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'True) (C1 ('MetaCons "OnionRoutingPacket" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
onion_routing_packet :: ByteString -> Maybe OnionRoutingPacket Source #
Construct an OnionRoutingPacket from exactly 1366 bytes.
>>>let bs = BS.replicate 1366 0x00>>>fmap un_onion_routing_packet (onion_routing_packet bs) == Just bsTrue>>>onion_routing_packet (BS.take 1365 bs)Nothing
un_onion_routing_packet :: OnionRoutingPacket -> ByteString Source #
The bytes of an OnionRoutingPacket.
The SHA256 hash of an onion routing packet (the sha256_of_onion
field of update_fail_malformed_htlc).
Instances
| NFData OnionHash Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types | |||||
| Generic OnionHash Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Associated Types
| |||||
| Show OnionHash Source # | |||||
| Eq OnionHash Source # | |||||
| Ord OnionHash Source # | |||||
| type Rep OnionHash Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types type Rep OnionHash = D1 ('MetaData "OnionHash" "Lightning.Protocol.BOLT2.Types" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'True) (C1 ('MetaCons "OnionHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
onion_hash :: ByteString -> Maybe OnionHash Source #
Construct an OnionHash from exactly 32 bytes.
>>>onion_hash (BS.replicate 31 0x00)Nothing
un_onion_hash :: OnionHash -> ByteString Source #
The bytes of an OnionHash.
data AttributionData Source #
The 920-byte attribution_data of update_fulfill_htlc and
update_fail_htlc: twenty u32 HTLC hold times followed by 210
four-byte truncated HMACs. Kept opaque (BOLT #4 defines its use).
Instances
| NFData AttributionData Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Methods rnf :: AttributionData -> () # | |||||
| Generic AttributionData Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Associated Types
Methods from :: AttributionData -> Rep AttributionData x # to :: Rep AttributionData x -> AttributionData # | |||||
| Show AttributionData Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Methods showsPrec :: Int -> AttributionData -> ShowS # show :: AttributionData -> String # showList :: [AttributionData] -> ShowS # | |||||
| Eq AttributionData Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Methods (==) :: AttributionData -> AttributionData -> Bool # (/=) :: AttributionData -> AttributionData -> Bool # | |||||
| Ord AttributionData Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Methods compare :: AttributionData -> AttributionData -> Ordering # (<) :: AttributionData -> AttributionData -> Bool # (<=) :: AttributionData -> AttributionData -> Bool # (>) :: AttributionData -> AttributionData -> Bool # (>=) :: AttributionData -> AttributionData -> Bool # max :: AttributionData -> AttributionData -> AttributionData # min :: AttributionData -> AttributionData -> AttributionData # | |||||
| type Rep AttributionData Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types type Rep AttributionData = D1 ('MetaData "AttributionData" "Lightning.Protocol.BOLT2.Types" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'True) (C1 ('MetaCons "AttributionData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
attribution_data :: ByteString -> Maybe AttributionData Source #
Construct an AttributionData from exactly 920 bytes.
>>>let bs = BS.replicate 920 0x00>>>fmap un_attribution_data (attribution_data bs) == Just bsTrue>>>attribution_data (BS.drop 1 bs)Nothing
un_attribution_data :: AttributionData -> ByteString Source #
The bytes of an AttributionData.
The fee_range of closing_signed: the fees the sender is
prepared to pay for the closing transaction.
Constructors
| FeeRange | |
Fields | |
Instances
| NFData FeeRange Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types | |||||
| Generic FeeRange Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Associated Types
| |||||
| Show FeeRange Source # | |||||
| Eq FeeRange Source # | |||||
| type Rep FeeRange Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types type Rep FeeRange = D1 ('MetaData "FeeRange" "Lightning.Protocol.BOLT2.Types" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "FeeRange" 'PrefixI 'True) (S1 ('MetaSel ('Just "fee_range_min_fee_satoshis") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi) :*: S1 ('MetaSel ('Just "fee_range_max_fee_satoshis") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Satoshi))) | |||||
data NextFunding Source #
The next_funding record of channel_reestablish: an interactive
funding transaction whose signatures are still being exchanged.
Constructors
| NextFunding | |
Fields
| |
Instances
| NFData NextFunding Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Methods rnf :: NextFunding -> () # | |||||
| Generic NextFunding Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Associated Types
| |||||
| Show NextFunding Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types Methods showsPrec :: Int -> NextFunding -> ShowS # show :: NextFunding -> String # showList :: [NextFunding] -> ShowS # | |||||
| Eq NextFunding Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types | |||||
| type Rep NextFunding Source # | |||||
Defined in Lightning.Protocol.BOLT2.Types type Rep NextFunding = D1 ('MetaData "NextFunding" "Lightning.Protocol.BOLT2.Types" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "NextFunding" 'PrefixI 'True) (S1 ('MetaSel ('Just "next_funding_txid") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxId) :*: S1 ('MetaSel ('Just "next_funding_retransmit_flags") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word8))) | |||||
Encoding and decoding messages
encode_message :: Message -> Either EncodeError ByteString Source #
Encode a BOLT #2 message, including its type. Fails if a field can't be encoded or the result exceeds 65535 bytes.
>>>let stfu = Stfu cid True BOLT1.empty_tlv_stream>>>fmap BS.length (encode_message (MsgStfu stfu))Right 35
decode_message :: ByteString -> Either DecodeError Message Source #
Decode a BOLT #2 message, including its type.
A type that BOLT #2 doesn't define (including the splicing
messages, which this library doesn't implement) yields
DecodeUnknownEvenType or DecodeUnknownOddType.
>>>let wire = "\x00\x02" <> BS.replicate 32 0xab <> "\x01">>>fmap message_type (decode_message wire)Right 2>>>decode_message "\x00\x50"Left (DecodeUnknownEvenType 80)
data EncodeError Source #
Why a message failed to encode.
Constructors
| EncodeLengthOverflow | a length-prefixed field or a counted list exceeds 65535 |
| EncodeInvalidTlvs | a |
| EncodeMessageTooLarge | the message (type and payload) exceeds 65535 bytes |
Instances
| NFData EncodeError Source # | |||||
Defined in Lightning.Protocol.BOLT2.Codec Methods rnf :: EncodeError -> () # | |||||
| Generic EncodeError Source # | |||||
Defined in Lightning.Protocol.BOLT2.Codec Associated Types
| |||||
| Show EncodeError Source # | |||||
Defined in Lightning.Protocol.BOLT2.Codec Methods showsPrec :: Int -> EncodeError -> ShowS # show :: EncodeError -> String # showList :: [EncodeError] -> ShowS # | |||||
| Eq EncodeError Source # | |||||
Defined in Lightning.Protocol.BOLT2.Codec | |||||
| type Rep EncodeError Source # | |||||
Defined in Lightning.Protocol.BOLT2.Codec type Rep EncodeError = D1 ('MetaData "EncodeError" "Lightning.Protocol.BOLT2.Codec" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (C1 ('MetaCons "EncodeLengthOverflow" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EncodeInvalidTlvs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EncodeMessageTooLarge" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data DecodeError Source #
Why a message failed to decode.
Constructors
| DecodeInsufficientBytes | the input ended before a field did |
| DecodeInvalidPoint | a point lacks a compressed-encoding prefix |
| DecodeInvalidAmount | an amount exceeds 21 million BTC |
| DecodeInvalidInitiator | the |
| DecodeTlvError !TlvError | the message's TLV stream is malformed, or has an unknown even type |
| DecodeInvalidTlvValue !Word64 | a known TLV record (of the given type) has a malformed value |
| DecodeUnknownEvenType !Word16 | a message type that BOLT #2 doesn't define (even) |
| DecodeUnknownOddType !Word16 | a message type that BOLT #2 doesn't define (odd) |
Instances
| NFData DecodeError Source # | |||||
Defined in Lightning.Protocol.BOLT2.Codec Methods rnf :: DecodeError -> () # | |||||
| Generic DecodeError Source # | |||||
Defined in Lightning.Protocol.BOLT2.Codec Associated Types
| |||||
| Show DecodeError Source # | |||||
Defined in Lightning.Protocol.BOLT2.Codec Methods showsPrec :: Int -> DecodeError -> ShowS # show :: DecodeError -> String # showList :: [DecodeError] -> ShowS # | |||||
| Eq DecodeError Source # | |||||
Defined in Lightning.Protocol.BOLT2.Codec | |||||
| type Rep DecodeError Source # | |||||
Defined in Lightning.Protocol.BOLT2.Codec type Rep DecodeError = D1 ('MetaData "DecodeError" "Lightning.Protocol.BOLT2.Codec" "ppad-bolt2-0.1.0-GkwBVEcqXbr1J45sxzi5ww" 'False) (((C1 ('MetaCons "DecodeInsufficientBytes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DecodeInvalidPoint" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DecodeInvalidAmount" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DecodeInvalidInitiator" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DecodeTlvError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TlvError)) :+: C1 ('MetaCons "DecodeInvalidTlvValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64))) :+: (C1 ('MetaCons "DecodeUnknownEvenType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16)) :+: C1 ('MetaCons "DecodeUnknownOddType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16))))) | |||||
Payloads
encode_open_channel :: OpenChannel -> Either EncodeError ByteString Source #
Encode an OpenChannel payload.
decode_open_channel :: ByteString -> Either DecodeError OpenChannel Source #
Decode an OpenChannel payload.
encode_accept_channel :: AcceptChannel -> Either EncodeError ByteString Source #
Encode an AcceptChannel payload.
decode_accept_channel :: ByteString -> Either DecodeError AcceptChannel Source #
Decode an AcceptChannel payload.
encode_funding_created :: FundingCreated -> ByteString Source #
Encode a FundingCreated payload.
decode_funding_created :: ByteString -> Either DecodeError FundingCreated Source #
Decode a FundingCreated payload.
encode_funding_signed :: FundingSigned -> ByteString Source #
Encode a FundingSigned payload.
decode_funding_signed :: ByteString -> Either DecodeError FundingSigned Source #
Decode a FundingSigned payload.
encode_channel_ready :: ChannelReady -> Either EncodeError ByteString Source #
Encode a ChannelReady payload.
decode_channel_ready :: ByteString -> Either DecodeError ChannelReady Source #
Decode a ChannelReady payload.
encode_open_channel2 :: OpenChannel2 -> Either EncodeError ByteString Source #
Encode an OpenChannel2 payload.
decode_open_channel2 :: ByteString -> Either DecodeError OpenChannel2 Source #
Decode an OpenChannel2 payload.
encode_accept_channel2 :: AcceptChannel2 -> Either EncodeError ByteString Source #
Encode an AcceptChannel2 payload.
decode_accept_channel2 :: ByteString -> Either DecodeError AcceptChannel2 Source #
Decode an AcceptChannel2 payload.
encode_tx_add_input :: TxAddInput -> Either EncodeError ByteString Source #
Encode a TxAddInput payload. Fails if prevtx exceeds 65535
bytes.
decode_tx_add_input :: ByteString -> Either DecodeError TxAddInput Source #
Decode a TxAddInput payload.
encode_tx_add_output :: TxAddOutput -> ByteString Source #
Encode a TxAddOutput payload.
decode_tx_add_output :: ByteString -> Either DecodeError TxAddOutput Source #
Decode a TxAddOutput payload.
encode_tx_remove_input :: TxRemoveInput -> ByteString Source #
Encode a TxRemoveInput payload.
decode_tx_remove_input :: ByteString -> Either DecodeError TxRemoveInput Source #
Decode a TxRemoveInput payload.
encode_tx_remove_output :: TxRemoveOutput -> ByteString Source #
Encode a TxRemoveOutput payload.
decode_tx_remove_output :: ByteString -> Either DecodeError TxRemoveOutput Source #
Decode a TxRemoveOutput payload.
encode_tx_complete :: TxComplete -> ByteString Source #
Encode a TxComplete payload.
decode_tx_complete :: ByteString -> Either DecodeError TxComplete Source #
Decode a TxComplete payload.
encode_tx_signatures :: TxSignatures -> Either EncodeError ByteString Source #
Encode a TxSignatures payload. Fails if there are more than 65535
witnesses.
decode_tx_signatures :: ByteString -> Either DecodeError TxSignatures Source #
Decode a TxSignatures payload.
encode_tx_init_rbf :: TxInitRbf -> Either EncodeError ByteString Source #
Encode a TxInitRbf payload.
decode_tx_init_rbf :: ByteString -> Either DecodeError TxInitRbf Source #
Decode a TxInitRbf payload.
encode_tx_ack_rbf :: TxAckRbf -> Either EncodeError ByteString Source #
Encode a TxAckRbf payload.
decode_tx_ack_rbf :: ByteString -> Either DecodeError TxAckRbf Source #
Decode a TxAckRbf payload.
encode_tx_abort :: TxAbort -> Either EncodeError ByteString Source #
Encode a TxAbort payload. Fails if data exceeds 65535 bytes.
decode_tx_abort :: ByteString -> Either DecodeError TxAbort Source #
Decode a TxAbort payload.
encode_stfu :: Stfu -> ByteString Source #
Encode a Stfu payload.
decode_stfu :: ByteString -> Either DecodeError Stfu Source #
Decode a Stfu payload. The initiator byte must be 0 or 1.
encode_shutdown :: Shutdown -> ByteString Source #
Encode a Shutdown payload.
decode_shutdown :: ByteString -> Either DecodeError Shutdown Source #
Decode a Shutdown payload.
encode_closing_complete :: ClosingComplete -> Either EncodeError ByteString Source #
Encode a ClosingComplete payload.
decode_closing_complete :: ByteString -> Either DecodeError ClosingComplete Source #
Decode a ClosingComplete payload.
encode_closing_sig :: ClosingSig -> Either EncodeError ByteString Source #
Encode a ClosingSig payload.
decode_closing_sig :: ByteString -> Either DecodeError ClosingSig Source #
Decode a ClosingSig payload.
encode_closing_signed :: ClosingSigned -> Either EncodeError ByteString Source #
Encode a ClosingSigned payload.
decode_closing_signed :: ByteString -> Either DecodeError ClosingSigned Source #
Decode a ClosingSigned payload.
encode_update_add_htlc :: UpdateAddHtlc -> Either EncodeError ByteString Source #
Encode an UpdateAddHtlc payload.
decode_update_add_htlc :: ByteString -> Either DecodeError UpdateAddHtlc Source #
Decode an UpdateAddHtlc payload.
encode_update_fulfill_htlc :: UpdateFulfillHtlc -> Either EncodeError ByteString Source #
Encode an UpdateFulfillHtlc payload.
decode_update_fulfill_htlc :: ByteString -> Either DecodeError UpdateFulfillHtlc Source #
Decode an UpdateFulfillHtlc payload.
encode_update_fail_htlc :: UpdateFailHtlc -> Either EncodeError ByteString Source #
Encode an UpdateFailHtlc payload. Fails if reason exceeds 65535
bytes.
decode_update_fail_htlc :: ByteString -> Either DecodeError UpdateFailHtlc Source #
Decode an UpdateFailHtlc payload.
encode_update_fail_malformed_htlc :: UpdateFailMalformedHtlc -> ByteString Source #
Encode an UpdateFailMalformedHtlc payload.
decode_update_fail_malformed_htlc :: ByteString -> Either DecodeError UpdateFailMalformedHtlc Source #
Decode an UpdateFailMalformedHtlc payload.
encode_commitment_signed :: CommitmentSigned -> Either EncodeError ByteString Source #
Encode a CommitmentSigned payload. Fails if there are more than
65535 HTLC signatures.
decode_commitment_signed :: ByteString -> Either DecodeError CommitmentSigned Source #
Decode a CommitmentSigned payload.
encode_revoke_and_ack :: RevokeAndAck -> ByteString Source #
Encode a RevokeAndAck payload.
decode_revoke_and_ack :: ByteString -> Either DecodeError RevokeAndAck Source #
Decode a RevokeAndAck payload.
encode_update_fee :: UpdateFee -> ByteString Source #
Encode an UpdateFee payload.
decode_update_fee :: ByteString -> Either DecodeError UpdateFee Source #
Decode an UpdateFee payload.
encode_channel_reestablish :: ChannelReestablish -> Either EncodeError ByteString Source #
Encode a ChannelReestablish payload.
decode_channel_reestablish :: ByteString -> Either DecodeError ChannelReestablish Source #
Decode a ChannelReestablish payload.