| Copyright | (c) 2025 Jared Tobin |
|---|---|
| License | MIT |
| Maintainer | Jared Tobin <jared@ppad.tech> |
| Safe Haskell | None |
| Language | Haskell2010 |
Lightning.Protocol.BOLT3.Types
Description
Core types for BOLT #3 transaction and script formats.
Synopsis
- newtype Satoshi = Satoshi {}
- newtype MilliSatoshi = MilliSatoshi {}
- msat_to_sat :: MilliSatoshi -> Satoshi
- sat_to_msat :: Satoshi -> MilliSatoshi
- newtype Pubkey = Pubkey {}
- pubkey :: ByteString -> Maybe Pubkey
- newtype Seckey = Seckey {}
- seckey :: ByteString -> Maybe Seckey
- newtype Point = Point {}
- point :: ByteString -> Maybe Point
- newtype PaymentHash = PaymentHash {}
- payment_hash :: ByteString -> Maybe PaymentHash
- newtype PaymentPreimage = PaymentPreimage {}
- payment_preimage :: ByteString -> Maybe PaymentPreimage
- newtype TxId = TxId {
- unTxId :: ByteString
- txid :: ByteString -> Maybe TxId
- data Outpoint = Outpoint {
- outpoint_txid :: !TxId
- outpoint_index :: !Word32
- newtype Sequence = Sequence {
- unSequence :: Word32
- newtype Locktime = Locktime {
- unLocktime :: Word32
- newtype CommitmentNumber = CommitmentNumber {}
- commitment_number :: Word64 -> Maybe CommitmentNumber
- newtype ToSelfDelay = ToSelfDelay {}
- newtype CltvExpiry = CltvExpiry {}
- newtype DustLimit = DustLimit {}
- newtype FeeratePerKw = FeeratePerKw {}
- data HTLC = HTLC {}
- data HTLCDirection
- data Basepoints = Basepoints {}
- newtype PerCommitmentPoint = PerCommitmentPoint {}
- newtype PerCommitmentSecret = PerCommitmentSecret {}
- per_commitment_secret :: ByteString -> Maybe PerCommitmentSecret
- newtype RevocationBasepoint = RevocationBasepoint {}
- newtype PaymentBasepoint = PaymentBasepoint {}
- newtype DelayedPaymentBasepoint = DelayedPaymentBasepoint {}
- newtype HtlcBasepoint = HtlcBasepoint {}
- newtype LocalPubkey = LocalPubkey {}
- newtype RemotePubkey = RemotePubkey {}
- newtype LocalDelayedPubkey = LocalDelayedPubkey {}
- newtype RemoteDelayedPubkey = RemoteDelayedPubkey {}
- newtype LocalHtlcPubkey = LocalHtlcPubkey {}
- newtype RemoteHtlcPubkey = RemoteHtlcPubkey {}
- newtype RevocationPubkey = RevocationPubkey {}
- newtype FundingPubkey = FundingPubkey {}
- newtype Script = Script {}
- newtype Witness = Witness {
- unWitness :: [ByteString]
- data ChannelFeatures = ChannelFeatures {}
- has_anchors :: ChannelFeatures -> Bool
- commitment_weight_no_anchors :: Word64
- commitment_weight_anchors :: Word64
- htlc_timeout_weight_no_anchors :: Word64
- htlc_timeout_weight_anchors :: Word64
- htlc_success_weight_no_anchors :: Word64
- htlc_success_weight_anchors :: Word64
- htlc_output_weight :: Word64
- dust_p2pkh :: Satoshi
- dust_p2sh :: Satoshi
- dust_p2wpkh :: Satoshi
- dust_p2wsh :: Satoshi
- anchor_output_value :: Satoshi
Monetary amounts
Amount in satoshis.
Instances
| Generic Satoshi Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Num Satoshi Source # | |||||
| Show Satoshi Source # | |||||
| Eq Satoshi Source # | |||||
| Ord Satoshi Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
| type Rep Satoshi Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
newtype MilliSatoshi Source #
Amount in millisatoshis.
Constructors
| MilliSatoshi | |
Fields | |
Instances
msat_to_sat :: MilliSatoshi -> Satoshi Source #
Convert millisatoshis to satoshis (rounds down).
sat_to_msat :: Satoshi -> MilliSatoshi Source #
Convert satoshis to millisatoshis.
Keys and points
Compressed public key (33 bytes).
Constructors
| Pubkey | |
Fields | |
Instances
| Generic Pubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show Pubkey Source # | |||||
| Eq Pubkey Source # | |||||
| Ord Pubkey Source # | |||||
| type Rep Pubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep Pubkey = D1 ('MetaData "Pubkey" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "Pubkey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPubkey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
pubkey :: ByteString -> Maybe Pubkey Source #
Parse a 33-byte compressed public key.
Returns Nothing if the input is not exactly 33 bytes.
>>>pubkey (BS.replicate 33 0x02)Just (Pubkey ...)>>>pubkey (BS.replicate 32 0x02)Nothing
Secret key (32 bytes).
Constructors
| Seckey | |
Fields | |
Instances
| Generic Seckey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show Seckey Source # | |||||
| Eq Seckey Source # | |||||
| type Rep Seckey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep Seckey = D1 ('MetaData "Seckey" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "Seckey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSeckey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
seckey :: ByteString -> Maybe Seckey Source #
Parse a 32-byte secret key.
Returns Nothing if the input is not exactly 32 bytes.
Elliptic curve point (33-byte compressed form).
Constructors
| Point | |
Fields | |
Instances
| Generic Point Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show Point Source # | |||||
| Eq Point Source # | |||||
| Ord Point Source # | |||||
| type Rep Point Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep Point = D1 ('MetaData "Point" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "Point" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
point :: ByteString -> Maybe Point Source #
Parse a 33-byte elliptic curve point.
Returns Nothing if the input is not exactly 33 bytes.
Hashes
newtype PaymentHash Source #
Payment hash (32 bytes, SHA256 of preimage).
Constructors
| PaymentHash | |
Fields | |
Instances
| Generic PaymentHash Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show PaymentHash Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> PaymentHash -> ShowS # show :: PaymentHash -> String # showList :: [PaymentHash] -> ShowS # | |||||
| Eq PaymentHash Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
| Ord PaymentHash Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: PaymentHash -> PaymentHash -> Ordering # (<) :: PaymentHash -> PaymentHash -> Bool # (<=) :: PaymentHash -> PaymentHash -> Bool # (>) :: PaymentHash -> PaymentHash -> Bool # (>=) :: PaymentHash -> PaymentHash -> Bool # max :: PaymentHash -> PaymentHash -> PaymentHash # min :: PaymentHash -> PaymentHash -> PaymentHash # | |||||
| type Rep PaymentHash Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep PaymentHash = D1 ('MetaData "PaymentHash" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "PaymentHash" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPaymentHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
payment_hash :: ByteString -> Maybe PaymentHash Source #
Parse a 32-byte payment hash.
Returns Nothing if the input is not exactly 32 bytes.
newtype PaymentPreimage Source #
Payment preimage (32 bytes).
Constructors
| PaymentPreimage | |
Fields | |
Instances
| Generic PaymentPreimage Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
Methods from :: PaymentPreimage -> Rep PaymentPreimage x # to :: Rep PaymentPreimage x -> PaymentPreimage # | |||||
| Show PaymentPreimage Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> PaymentPreimage -> ShowS # show :: PaymentPreimage -> String # showList :: [PaymentPreimage] -> ShowS # | |||||
| Eq PaymentPreimage Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: PaymentPreimage -> PaymentPreimage -> Bool # (/=) :: PaymentPreimage -> PaymentPreimage -> Bool # | |||||
| type Rep PaymentPreimage Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep PaymentPreimage = D1 ('MetaData "PaymentPreimage" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "PaymentPreimage" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPaymentPreimage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
payment_preimage :: ByteString -> Maybe PaymentPreimage Source #
Parse a 32-byte payment preimage.
Returns Nothing if the input is not exactly 32 bytes.
Transaction primitives
Transaction ID (32 bytes, little-endian hash).
Constructors
| TxId | |
Fields
| |
Instances
| Generic TxId Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show TxId Source # | |||||
| Eq TxId Source # | |||||
| Ord TxId Source # | |||||
| type Rep TxId Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep TxId = D1 ('MetaData "TxId" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "TxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
txid :: ByteString -> Maybe TxId Source #
Parse a 32-byte transaction ID.
Returns Nothing if the input is not exactly 32 bytes.
Transaction outpoint (txid + output index).
Constructors
| Outpoint | |
Fields
| |
Instances
| Generic Outpoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show Outpoint Source # | |||||
| Eq Outpoint Source # | |||||
| Ord Outpoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
| type Rep Outpoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep Outpoint = D1 ('MetaData "Outpoint" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'False) (C1 ('MetaCons "Outpoint" 'PrefixI 'True) (S1 ('MetaSel ('Just "outpoint_txid") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 TxId) :*: S1 ('MetaSel ('Just "outpoint_index") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32))) | |||||
Transaction input sequence number.
Constructors
| Sequence | |
Fields
| |
Instances
| Generic Sequence Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Num Sequence Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
| Show Sequence Source # | |||||
| Eq Sequence Source # | |||||
| Ord Sequence Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
| type Rep Sequence Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
Transaction locktime.
Constructors
| Locktime | |
Fields
| |
Instances
| Generic Locktime Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Num Locktime Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
| Show Locktime Source # | |||||
| Eq Locktime Source # | |||||
| Ord Locktime Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
| type Rep Locktime Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
Channel parameters
newtype CommitmentNumber Source #
48-bit commitment number.
Constructors
| CommitmentNumber | |
Fields | |
Instances
| Generic CommitmentNumber Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
Methods from :: CommitmentNumber -> Rep CommitmentNumber x # to :: Rep CommitmentNumber x -> CommitmentNumber # | |||||
| Num CommitmentNumber Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (+) :: CommitmentNumber -> CommitmentNumber -> CommitmentNumber # (-) :: CommitmentNumber -> CommitmentNumber -> CommitmentNumber # (*) :: CommitmentNumber -> CommitmentNumber -> CommitmentNumber # negate :: CommitmentNumber -> CommitmentNumber # abs :: CommitmentNumber -> CommitmentNumber # signum :: CommitmentNumber -> CommitmentNumber # fromInteger :: Integer -> CommitmentNumber # | |||||
| Show CommitmentNumber Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> CommitmentNumber -> ShowS # show :: CommitmentNumber -> String # showList :: [CommitmentNumber] -> ShowS # | |||||
| Eq CommitmentNumber Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: CommitmentNumber -> CommitmentNumber -> Bool # (/=) :: CommitmentNumber -> CommitmentNumber -> Bool # | |||||
| Ord CommitmentNumber Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: CommitmentNumber -> CommitmentNumber -> Ordering # (<) :: CommitmentNumber -> CommitmentNumber -> Bool # (<=) :: CommitmentNumber -> CommitmentNumber -> Bool # (>) :: CommitmentNumber -> CommitmentNumber -> Bool # (>=) :: CommitmentNumber -> CommitmentNumber -> Bool # max :: CommitmentNumber -> CommitmentNumber -> CommitmentNumber # min :: CommitmentNumber -> CommitmentNumber -> CommitmentNumber # | |||||
| type Rep CommitmentNumber Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep CommitmentNumber = D1 ('MetaData "CommitmentNumber" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "CommitmentNumber" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCommitmentNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||
commitment_number :: Word64 -> Maybe CommitmentNumber Source #
Parse a 48-bit commitment number.
Returns Nothing if the value exceeds 2^48 - 1.
newtype ToSelfDelay Source #
CSV delay for to_local outputs.
Constructors
| ToSelfDelay | |
Fields | |
Instances
| Generic ToSelfDelay Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Num ToSelfDelay Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (+) :: ToSelfDelay -> ToSelfDelay -> ToSelfDelay # (-) :: ToSelfDelay -> ToSelfDelay -> ToSelfDelay # (*) :: ToSelfDelay -> ToSelfDelay -> ToSelfDelay # negate :: ToSelfDelay -> ToSelfDelay # abs :: ToSelfDelay -> ToSelfDelay # signum :: ToSelfDelay -> ToSelfDelay # fromInteger :: Integer -> ToSelfDelay # | |||||
| Show ToSelfDelay Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> ToSelfDelay -> ShowS # show :: ToSelfDelay -> String # showList :: [ToSelfDelay] -> ShowS # | |||||
| Eq ToSelfDelay Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
| Ord ToSelfDelay Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: ToSelfDelay -> ToSelfDelay -> Ordering # (<) :: ToSelfDelay -> ToSelfDelay -> Bool # (<=) :: ToSelfDelay -> ToSelfDelay -> Bool # (>) :: ToSelfDelay -> ToSelfDelay -> Bool # (>=) :: ToSelfDelay -> ToSelfDelay -> Bool # max :: ToSelfDelay -> ToSelfDelay -> ToSelfDelay # min :: ToSelfDelay -> ToSelfDelay -> ToSelfDelay # | |||||
| type Rep ToSelfDelay Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep ToSelfDelay = D1 ('MetaData "ToSelfDelay" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "ToSelfDelay" 'PrefixI 'True) (S1 ('MetaSel ('Just "unToSelfDelay") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16))) | |||||
newtype CltvExpiry Source #
CLTV expiry for HTLCs.
Constructors
| CltvExpiry | |
Fields | |
Instances
| Generic CltvExpiry Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Num CltvExpiry Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (+) :: CltvExpiry -> CltvExpiry -> CltvExpiry # (-) :: CltvExpiry -> CltvExpiry -> CltvExpiry # (*) :: CltvExpiry -> CltvExpiry -> CltvExpiry # negate :: CltvExpiry -> CltvExpiry # abs :: CltvExpiry -> CltvExpiry # signum :: CltvExpiry -> CltvExpiry # fromInteger :: Integer -> CltvExpiry # | |||||
| Show CltvExpiry Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> CltvExpiry -> ShowS # show :: CltvExpiry -> String # showList :: [CltvExpiry] -> ShowS # | |||||
| Eq CltvExpiry Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
| Ord CltvExpiry Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: CltvExpiry -> CltvExpiry -> Ordering # (<) :: CltvExpiry -> CltvExpiry -> Bool # (<=) :: CltvExpiry -> CltvExpiry -> Bool # (>) :: CltvExpiry -> CltvExpiry -> Bool # (>=) :: CltvExpiry -> CltvExpiry -> Bool # max :: CltvExpiry -> CltvExpiry -> CltvExpiry # min :: CltvExpiry -> CltvExpiry -> CltvExpiry # | |||||
| type Rep CltvExpiry Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep CltvExpiry = D1 ('MetaData "CltvExpiry" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "CltvExpiry" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCltvExpiry") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))) | |||||
Dust limit threshold.
Constructors
| DustLimit | |
Fields | |
Instances
| Generic DustLimit Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show DustLimit Source # | |||||
| Eq DustLimit Source # | |||||
| Ord DustLimit Source # | |||||
| type Rep DustLimit Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
newtype FeeratePerKw Source #
Fee rate in satoshis per 1000 weight units.
Constructors
| FeeratePerKw | |
Fields | |
Instances
| Generic FeeratePerKw Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Num FeeratePerKw Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (+) :: FeeratePerKw -> FeeratePerKw -> FeeratePerKw # (-) :: FeeratePerKw -> FeeratePerKw -> FeeratePerKw # (*) :: FeeratePerKw -> FeeratePerKw -> FeeratePerKw # negate :: FeeratePerKw -> FeeratePerKw # abs :: FeeratePerKw -> FeeratePerKw # signum :: FeeratePerKw -> FeeratePerKw # fromInteger :: Integer -> FeeratePerKw # | |||||
| Show FeeratePerKw Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> FeeratePerKw -> ShowS # show :: FeeratePerKw -> String # showList :: [FeeratePerKw] -> ShowS # | |||||
| Eq FeeratePerKw Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
| Ord FeeratePerKw Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: FeeratePerKw -> FeeratePerKw -> Ordering # (<) :: FeeratePerKw -> FeeratePerKw -> Bool # (<=) :: FeeratePerKw -> FeeratePerKw -> Bool # (>) :: FeeratePerKw -> FeeratePerKw -> Bool # (>=) :: FeeratePerKw -> FeeratePerKw -> Bool # max :: FeeratePerKw -> FeeratePerKw -> FeeratePerKw # min :: FeeratePerKw -> FeeratePerKw -> FeeratePerKw # | |||||
| type Rep FeeratePerKw Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep FeeratePerKw = D1 ('MetaData "FeeratePerKw" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "FeeratePerKw" 'PrefixI 'True) (S1 ('MetaSel ('Just "unFeeratePerKw") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))) | |||||
HTLC types
HTLC output details.
NOTE: No Ord instance is provided. BOLT #3 requires output ordering by
amount then scriptPubKey, but scriptPubKey depends on derived keys which
are not available here. Use sort_outputs in Tx module for proper BIP69
output ordering.
Constructors
| HTLC | |
Fields | |
Instances
| Generic HTLC Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show HTLC Source # | |||||
| Eq HTLC Source # | |||||
| type Rep HTLC Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep HTLC = D1 ('MetaData "HTLC" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'False) (C1 ('MetaCons "HTLC" 'PrefixI 'True) ((S1 ('MetaSel ('Just "htlc_direction") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HTLCDirection) :*: S1 ('MetaSel ('Just "htlc_amount_msat") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 MilliSatoshi)) :*: (S1 ('MetaSel ('Just "htlc_payment_hash") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 PaymentHash) :*: S1 ('MetaSel ('Just "htlc_cltv_expiry") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 CltvExpiry)))) | |||||
data HTLCDirection Source #
Direction of an HTLC from the commitment tx owner's perspective.
Constructors
| HTLCOffered | We offered this HTLC (outgoing) |
| HTLCReceived | We received this HTLC (incoming) |
Instances
| Generic HTLCDirection Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show HTLCDirection Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> HTLCDirection -> ShowS # show :: HTLCDirection -> String # showList :: [HTLCDirection] -> ShowS # | |||||
| Eq HTLCDirection Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: HTLCDirection -> HTLCDirection -> Bool # (/=) :: HTLCDirection -> HTLCDirection -> Bool # | |||||
| Ord HTLCDirection Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: HTLCDirection -> HTLCDirection -> Ordering # (<) :: HTLCDirection -> HTLCDirection -> Bool # (<=) :: HTLCDirection -> HTLCDirection -> Bool # (>) :: HTLCDirection -> HTLCDirection -> Bool # (>=) :: HTLCDirection -> HTLCDirection -> Bool # max :: HTLCDirection -> HTLCDirection -> HTLCDirection # min :: HTLCDirection -> HTLCDirection -> HTLCDirection # | |||||
| type Rep HTLCDirection Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
Basepoints
data Basepoints Source #
Collection of all basepoints for one party.
Constructors
| Basepoints | |
Instances
| Generic Basepoints Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show Basepoints Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> Basepoints -> ShowS # show :: Basepoints -> String # showList :: [Basepoints] -> ShowS # | |||||
| Eq Basepoints Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
| type Rep Basepoints Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep Basepoints = D1 ('MetaData "Basepoints" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'False) (C1 ('MetaCons "Basepoints" 'PrefixI 'True) ((S1 ('MetaSel ('Just "bp_revocation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RevocationBasepoint) :*: S1 ('MetaSel ('Just "bp_payment") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PaymentBasepoint)) :*: (S1 ('MetaSel ('Just "bp_delayed_payment") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DelayedPaymentBasepoint) :*: S1 ('MetaSel ('Just "bp_htlc") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HtlcBasepoint)))) | |||||
newtype PerCommitmentPoint Source #
Per-commitment point (used to derive keys).
Constructors
| PerCommitmentPoint | |
Fields | |
Instances
| Generic PerCommitmentPoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
Methods from :: PerCommitmentPoint -> Rep PerCommitmentPoint x # to :: Rep PerCommitmentPoint x -> PerCommitmentPoint # | |||||
| Show PerCommitmentPoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> PerCommitmentPoint -> ShowS # show :: PerCommitmentPoint -> String # showList :: [PerCommitmentPoint] -> ShowS # | |||||
| Eq PerCommitmentPoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: PerCommitmentPoint -> PerCommitmentPoint -> Bool # (/=) :: PerCommitmentPoint -> PerCommitmentPoint -> Bool # | |||||
| Ord PerCommitmentPoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: PerCommitmentPoint -> PerCommitmentPoint -> Ordering # (<) :: PerCommitmentPoint -> PerCommitmentPoint -> Bool # (<=) :: PerCommitmentPoint -> PerCommitmentPoint -> Bool # (>) :: PerCommitmentPoint -> PerCommitmentPoint -> Bool # (>=) :: PerCommitmentPoint -> PerCommitmentPoint -> Bool # max :: PerCommitmentPoint -> PerCommitmentPoint -> PerCommitmentPoint # min :: PerCommitmentPoint -> PerCommitmentPoint -> PerCommitmentPoint # | |||||
| type Rep PerCommitmentPoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep PerCommitmentPoint = D1 ('MetaData "PerCommitmentPoint" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "PerCommitmentPoint" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerCommitmentPoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Point))) | |||||
newtype PerCommitmentSecret Source #
Per-commitment secret (32 bytes).
Constructors
| PerCommitmentSecret | |
Fields | |
Instances
| Generic PerCommitmentSecret Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
Methods from :: PerCommitmentSecret -> Rep PerCommitmentSecret x # to :: Rep PerCommitmentSecret x -> PerCommitmentSecret # | |||||
| Show PerCommitmentSecret Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> PerCommitmentSecret -> ShowS # show :: PerCommitmentSecret -> String # showList :: [PerCommitmentSecret] -> ShowS # | |||||
| Eq PerCommitmentSecret Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: PerCommitmentSecret -> PerCommitmentSecret -> Bool # (/=) :: PerCommitmentSecret -> PerCommitmentSecret -> Bool # | |||||
| type Rep PerCommitmentSecret Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep PerCommitmentSecret = D1 ('MetaData "PerCommitmentSecret" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "PerCommitmentSecret" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerCommitmentSecret") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
per_commitment_secret :: ByteString -> Maybe PerCommitmentSecret Source #
Parse a 32-byte per-commitment secret.
Returns Nothing if the input is not exactly 32 bytes.
newtype RevocationBasepoint Source #
Revocation basepoint.
Constructors
| RevocationBasepoint | |
Fields | |
Instances
| Generic RevocationBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
Methods from :: RevocationBasepoint -> Rep RevocationBasepoint x # to :: Rep RevocationBasepoint x -> RevocationBasepoint # | |||||
| Show RevocationBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> RevocationBasepoint -> ShowS # show :: RevocationBasepoint -> String # showList :: [RevocationBasepoint] -> ShowS # | |||||
| Eq RevocationBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: RevocationBasepoint -> RevocationBasepoint -> Bool # (/=) :: RevocationBasepoint -> RevocationBasepoint -> Bool # | |||||
| Ord RevocationBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: RevocationBasepoint -> RevocationBasepoint -> Ordering # (<) :: RevocationBasepoint -> RevocationBasepoint -> Bool # (<=) :: RevocationBasepoint -> RevocationBasepoint -> Bool # (>) :: RevocationBasepoint -> RevocationBasepoint -> Bool # (>=) :: RevocationBasepoint -> RevocationBasepoint -> Bool # max :: RevocationBasepoint -> RevocationBasepoint -> RevocationBasepoint # min :: RevocationBasepoint -> RevocationBasepoint -> RevocationBasepoint # | |||||
| type Rep RevocationBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep RevocationBasepoint = D1 ('MetaData "RevocationBasepoint" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "RevocationBasepoint" 'PrefixI 'True) (S1 ('MetaSel ('Just "unRevocationBasepoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Point))) | |||||
newtype PaymentBasepoint Source #
Payment basepoint.
Constructors
| PaymentBasepoint | |
Fields | |
Instances
| Generic PaymentBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
Methods from :: PaymentBasepoint -> Rep PaymentBasepoint x # to :: Rep PaymentBasepoint x -> PaymentBasepoint # | |||||
| Show PaymentBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> PaymentBasepoint -> ShowS # show :: PaymentBasepoint -> String # showList :: [PaymentBasepoint] -> ShowS # | |||||
| Eq PaymentBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: PaymentBasepoint -> PaymentBasepoint -> Bool # (/=) :: PaymentBasepoint -> PaymentBasepoint -> Bool # | |||||
| Ord PaymentBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: PaymentBasepoint -> PaymentBasepoint -> Ordering # (<) :: PaymentBasepoint -> PaymentBasepoint -> Bool # (<=) :: PaymentBasepoint -> PaymentBasepoint -> Bool # (>) :: PaymentBasepoint -> PaymentBasepoint -> Bool # (>=) :: PaymentBasepoint -> PaymentBasepoint -> Bool # max :: PaymentBasepoint -> PaymentBasepoint -> PaymentBasepoint # min :: PaymentBasepoint -> PaymentBasepoint -> PaymentBasepoint # | |||||
| type Rep PaymentBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep PaymentBasepoint = D1 ('MetaData "PaymentBasepoint" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "PaymentBasepoint" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPaymentBasepoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Point))) | |||||
newtype DelayedPaymentBasepoint Source #
Delayed payment basepoint.
Constructors
| DelayedPaymentBasepoint | |
Fields | |
Instances
| Generic DelayedPaymentBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
Methods from :: DelayedPaymentBasepoint -> Rep DelayedPaymentBasepoint x # to :: Rep DelayedPaymentBasepoint x -> DelayedPaymentBasepoint # | |||||
| Show DelayedPaymentBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> DelayedPaymentBasepoint -> ShowS # show :: DelayedPaymentBasepoint -> String # showList :: [DelayedPaymentBasepoint] -> ShowS # | |||||
| Eq DelayedPaymentBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: DelayedPaymentBasepoint -> DelayedPaymentBasepoint -> Bool # (/=) :: DelayedPaymentBasepoint -> DelayedPaymentBasepoint -> Bool # | |||||
| Ord DelayedPaymentBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: DelayedPaymentBasepoint -> DelayedPaymentBasepoint -> Ordering # (<) :: DelayedPaymentBasepoint -> DelayedPaymentBasepoint -> Bool # (<=) :: DelayedPaymentBasepoint -> DelayedPaymentBasepoint -> Bool # (>) :: DelayedPaymentBasepoint -> DelayedPaymentBasepoint -> Bool # (>=) :: DelayedPaymentBasepoint -> DelayedPaymentBasepoint -> Bool # max :: DelayedPaymentBasepoint -> DelayedPaymentBasepoint -> DelayedPaymentBasepoint # min :: DelayedPaymentBasepoint -> DelayedPaymentBasepoint -> DelayedPaymentBasepoint # | |||||
| type Rep DelayedPaymentBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep DelayedPaymentBasepoint = D1 ('MetaData "DelayedPaymentBasepoint" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "DelayedPaymentBasepoint" 'PrefixI 'True) (S1 ('MetaSel ('Just "unDelayedPaymentBasepoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Point))) | |||||
newtype HtlcBasepoint Source #
HTLC basepoint.
Constructors
| HtlcBasepoint | |
Fields | |
Instances
| Generic HtlcBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show HtlcBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> HtlcBasepoint -> ShowS # show :: HtlcBasepoint -> String # showList :: [HtlcBasepoint] -> ShowS # | |||||
| Eq HtlcBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: HtlcBasepoint -> HtlcBasepoint -> Bool # (/=) :: HtlcBasepoint -> HtlcBasepoint -> Bool # | |||||
| Ord HtlcBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: HtlcBasepoint -> HtlcBasepoint -> Ordering # (<) :: HtlcBasepoint -> HtlcBasepoint -> Bool # (<=) :: HtlcBasepoint -> HtlcBasepoint -> Bool # (>) :: HtlcBasepoint -> HtlcBasepoint -> Bool # (>=) :: HtlcBasepoint -> HtlcBasepoint -> Bool # max :: HtlcBasepoint -> HtlcBasepoint -> HtlcBasepoint # min :: HtlcBasepoint -> HtlcBasepoint -> HtlcBasepoint # | |||||
| type Rep HtlcBasepoint Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep HtlcBasepoint = D1 ('MetaData "HtlcBasepoint" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "HtlcBasepoint" 'PrefixI 'True) (S1 ('MetaSel ('Just "unHtlcBasepoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Point))) | |||||
Derived keys
newtype LocalPubkey Source #
Local pubkey (derived from payment_basepoint + per_commitment_point).
Constructors
| LocalPubkey | |
Fields | |
Instances
| Generic LocalPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show LocalPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> LocalPubkey -> ShowS # show :: LocalPubkey -> String # showList :: [LocalPubkey] -> ShowS # | |||||
| Eq LocalPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
| Ord LocalPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: LocalPubkey -> LocalPubkey -> Ordering # (<) :: LocalPubkey -> LocalPubkey -> Bool # (<=) :: LocalPubkey -> LocalPubkey -> Bool # (>) :: LocalPubkey -> LocalPubkey -> Bool # (>=) :: LocalPubkey -> LocalPubkey -> Bool # max :: LocalPubkey -> LocalPubkey -> LocalPubkey # min :: LocalPubkey -> LocalPubkey -> LocalPubkey # | |||||
| type Rep LocalPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep LocalPubkey = D1 ('MetaData "LocalPubkey" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "LocalPubkey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unLocalPubkey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pubkey))) | |||||
newtype RemotePubkey Source #
Remote pubkey (simply the remote's payment_basepoint).
Constructors
| RemotePubkey | |
Fields | |
Instances
| Generic RemotePubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show RemotePubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> RemotePubkey -> ShowS # show :: RemotePubkey -> String # showList :: [RemotePubkey] -> ShowS # | |||||
| Eq RemotePubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
| Ord RemotePubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: RemotePubkey -> RemotePubkey -> Ordering # (<) :: RemotePubkey -> RemotePubkey -> Bool # (<=) :: RemotePubkey -> RemotePubkey -> Bool # (>) :: RemotePubkey -> RemotePubkey -> Bool # (>=) :: RemotePubkey -> RemotePubkey -> Bool # max :: RemotePubkey -> RemotePubkey -> RemotePubkey # min :: RemotePubkey -> RemotePubkey -> RemotePubkey # | |||||
| type Rep RemotePubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep RemotePubkey = D1 ('MetaData "RemotePubkey" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "RemotePubkey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unRemotePubkey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pubkey))) | |||||
newtype LocalDelayedPubkey Source #
Local delayed pubkey.
Constructors
| LocalDelayedPubkey | |
Fields | |
Instances
| Generic LocalDelayedPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
Methods from :: LocalDelayedPubkey -> Rep LocalDelayedPubkey x # to :: Rep LocalDelayedPubkey x -> LocalDelayedPubkey # | |||||
| Show LocalDelayedPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> LocalDelayedPubkey -> ShowS # show :: LocalDelayedPubkey -> String # showList :: [LocalDelayedPubkey] -> ShowS # | |||||
| Eq LocalDelayedPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: LocalDelayedPubkey -> LocalDelayedPubkey -> Bool # (/=) :: LocalDelayedPubkey -> LocalDelayedPubkey -> Bool # | |||||
| Ord LocalDelayedPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: LocalDelayedPubkey -> LocalDelayedPubkey -> Ordering # (<) :: LocalDelayedPubkey -> LocalDelayedPubkey -> Bool # (<=) :: LocalDelayedPubkey -> LocalDelayedPubkey -> Bool # (>) :: LocalDelayedPubkey -> LocalDelayedPubkey -> Bool # (>=) :: LocalDelayedPubkey -> LocalDelayedPubkey -> Bool # max :: LocalDelayedPubkey -> LocalDelayedPubkey -> LocalDelayedPubkey # min :: LocalDelayedPubkey -> LocalDelayedPubkey -> LocalDelayedPubkey # | |||||
| type Rep LocalDelayedPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep LocalDelayedPubkey = D1 ('MetaData "LocalDelayedPubkey" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "LocalDelayedPubkey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unLocalDelayedPubkey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pubkey))) | |||||
newtype RemoteDelayedPubkey Source #
Remote delayed pubkey.
Constructors
| RemoteDelayedPubkey | |
Fields | |
Instances
| Generic RemoteDelayedPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
Methods from :: RemoteDelayedPubkey -> Rep RemoteDelayedPubkey x # to :: Rep RemoteDelayedPubkey x -> RemoteDelayedPubkey # | |||||
| Show RemoteDelayedPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> RemoteDelayedPubkey -> ShowS # show :: RemoteDelayedPubkey -> String # showList :: [RemoteDelayedPubkey] -> ShowS # | |||||
| Eq RemoteDelayedPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: RemoteDelayedPubkey -> RemoteDelayedPubkey -> Bool # (/=) :: RemoteDelayedPubkey -> RemoteDelayedPubkey -> Bool # | |||||
| Ord RemoteDelayedPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: RemoteDelayedPubkey -> RemoteDelayedPubkey -> Ordering # (<) :: RemoteDelayedPubkey -> RemoteDelayedPubkey -> Bool # (<=) :: RemoteDelayedPubkey -> RemoteDelayedPubkey -> Bool # (>) :: RemoteDelayedPubkey -> RemoteDelayedPubkey -> Bool # (>=) :: RemoteDelayedPubkey -> RemoteDelayedPubkey -> Bool # max :: RemoteDelayedPubkey -> RemoteDelayedPubkey -> RemoteDelayedPubkey # min :: RemoteDelayedPubkey -> RemoteDelayedPubkey -> RemoteDelayedPubkey # | |||||
| type Rep RemoteDelayedPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep RemoteDelayedPubkey = D1 ('MetaData "RemoteDelayedPubkey" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "RemoteDelayedPubkey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unRemoteDelayedPubkey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pubkey))) | |||||
newtype LocalHtlcPubkey Source #
Local HTLC pubkey.
Constructors
| LocalHtlcPubkey | |
Fields | |
Instances
| Generic LocalHtlcPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
Methods from :: LocalHtlcPubkey -> Rep LocalHtlcPubkey x # to :: Rep LocalHtlcPubkey x -> LocalHtlcPubkey # | |||||
| Show LocalHtlcPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> LocalHtlcPubkey -> ShowS # show :: LocalHtlcPubkey -> String # showList :: [LocalHtlcPubkey] -> ShowS # | |||||
| Eq LocalHtlcPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: LocalHtlcPubkey -> LocalHtlcPubkey -> Bool # (/=) :: LocalHtlcPubkey -> LocalHtlcPubkey -> Bool # | |||||
| Ord LocalHtlcPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: LocalHtlcPubkey -> LocalHtlcPubkey -> Ordering # (<) :: LocalHtlcPubkey -> LocalHtlcPubkey -> Bool # (<=) :: LocalHtlcPubkey -> LocalHtlcPubkey -> Bool # (>) :: LocalHtlcPubkey -> LocalHtlcPubkey -> Bool # (>=) :: LocalHtlcPubkey -> LocalHtlcPubkey -> Bool # max :: LocalHtlcPubkey -> LocalHtlcPubkey -> LocalHtlcPubkey # min :: LocalHtlcPubkey -> LocalHtlcPubkey -> LocalHtlcPubkey # | |||||
| type Rep LocalHtlcPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep LocalHtlcPubkey = D1 ('MetaData "LocalHtlcPubkey" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "LocalHtlcPubkey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unLocalHtlcPubkey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pubkey))) | |||||
newtype RemoteHtlcPubkey Source #
Remote HTLC pubkey.
Constructors
| RemoteHtlcPubkey | |
Fields | |
Instances
| Generic RemoteHtlcPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
Methods from :: RemoteHtlcPubkey -> Rep RemoteHtlcPubkey x # to :: Rep RemoteHtlcPubkey x -> RemoteHtlcPubkey # | |||||
| Show RemoteHtlcPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> RemoteHtlcPubkey -> ShowS # show :: RemoteHtlcPubkey -> String # showList :: [RemoteHtlcPubkey] -> ShowS # | |||||
| Eq RemoteHtlcPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: RemoteHtlcPubkey -> RemoteHtlcPubkey -> Bool # (/=) :: RemoteHtlcPubkey -> RemoteHtlcPubkey -> Bool # | |||||
| Ord RemoteHtlcPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: RemoteHtlcPubkey -> RemoteHtlcPubkey -> Ordering # (<) :: RemoteHtlcPubkey -> RemoteHtlcPubkey -> Bool # (<=) :: RemoteHtlcPubkey -> RemoteHtlcPubkey -> Bool # (>) :: RemoteHtlcPubkey -> RemoteHtlcPubkey -> Bool # (>=) :: RemoteHtlcPubkey -> RemoteHtlcPubkey -> Bool # max :: RemoteHtlcPubkey -> RemoteHtlcPubkey -> RemoteHtlcPubkey # min :: RemoteHtlcPubkey -> RemoteHtlcPubkey -> RemoteHtlcPubkey # | |||||
| type Rep RemoteHtlcPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep RemoteHtlcPubkey = D1 ('MetaData "RemoteHtlcPubkey" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "RemoteHtlcPubkey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unRemoteHtlcPubkey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pubkey))) | |||||
newtype RevocationPubkey Source #
Revocation pubkey (derived from revocation_basepoint + per_commitment).
Constructors
| RevocationPubkey | |
Fields | |
Instances
| Generic RevocationPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
Methods from :: RevocationPubkey -> Rep RevocationPubkey x # to :: Rep RevocationPubkey x -> RevocationPubkey # | |||||
| Show RevocationPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> RevocationPubkey -> ShowS # show :: RevocationPubkey -> String # showList :: [RevocationPubkey] -> ShowS # | |||||
| Eq RevocationPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: RevocationPubkey -> RevocationPubkey -> Bool # (/=) :: RevocationPubkey -> RevocationPubkey -> Bool # | |||||
| Ord RevocationPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: RevocationPubkey -> RevocationPubkey -> Ordering # (<) :: RevocationPubkey -> RevocationPubkey -> Bool # (<=) :: RevocationPubkey -> RevocationPubkey -> Bool # (>) :: RevocationPubkey -> RevocationPubkey -> Bool # (>=) :: RevocationPubkey -> RevocationPubkey -> Bool # max :: RevocationPubkey -> RevocationPubkey -> RevocationPubkey # min :: RevocationPubkey -> RevocationPubkey -> RevocationPubkey # | |||||
| type Rep RevocationPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep RevocationPubkey = D1 ('MetaData "RevocationPubkey" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "RevocationPubkey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unRevocationPubkey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pubkey))) | |||||
newtype FundingPubkey Source #
Funding pubkey (used in 2-of-2 multisig).
Constructors
| FundingPubkey | |
Fields | |
Instances
| Generic FundingPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show FundingPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> FundingPubkey -> ShowS # show :: FundingPubkey -> String # showList :: [FundingPubkey] -> ShowS # | |||||
| Eq FundingPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: FundingPubkey -> FundingPubkey -> Bool # (/=) :: FundingPubkey -> FundingPubkey -> Bool # | |||||
| Ord FundingPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods compare :: FundingPubkey -> FundingPubkey -> Ordering # (<) :: FundingPubkey -> FundingPubkey -> Bool # (<=) :: FundingPubkey -> FundingPubkey -> Bool # (>) :: FundingPubkey -> FundingPubkey -> Bool # (>=) :: FundingPubkey -> FundingPubkey -> Bool # max :: FundingPubkey -> FundingPubkey -> FundingPubkey # min :: FundingPubkey -> FundingPubkey -> FundingPubkey # | |||||
| type Rep FundingPubkey Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep FundingPubkey = D1 ('MetaData "FundingPubkey" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "FundingPubkey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unFundingPubkey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pubkey))) | |||||
Script and witness
Bitcoin script (serialized).
Constructors
| Script | |
Fields | |
Instances
| Generic Script Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show Script Source # | |||||
| Eq Script Source # | |||||
| Ord Script Source # | |||||
| type Rep Script Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep Script = D1 ('MetaData "Script" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "Script" 'PrefixI 'True) (S1 ('MetaSel ('Just "unScript") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
Transaction witness stack.
Constructors
| Witness | |
Fields
| |
Instances
| Generic Witness Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
| |||||
| Show Witness Source # | |||||
| Eq Witness Source # | |||||
| Ord Witness Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types | |||||
| type Rep Witness Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep Witness = D1 ('MetaData "Witness" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'True) (C1 ('MetaCons "Witness" 'PrefixI 'True) (S1 ('MetaSel ('Just "unWitness") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ByteString]))) | |||||
Channel options
data ChannelFeatures Source #
Channel feature flags relevant to BOLT #3.
Constructors
| ChannelFeatures | |
Fields | |
Instances
| Generic ChannelFeatures Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Associated Types
Methods from :: ChannelFeatures -> Rep ChannelFeatures x # to :: Rep ChannelFeatures x -> ChannelFeatures # | |||||
| Show ChannelFeatures Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods showsPrec :: Int -> ChannelFeatures -> ShowS # show :: ChannelFeatures -> String # showList :: [ChannelFeatures] -> ShowS # | |||||
| Eq ChannelFeatures Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types Methods (==) :: ChannelFeatures -> ChannelFeatures -> Bool # (/=) :: ChannelFeatures -> ChannelFeatures -> Bool # | |||||
| type Rep ChannelFeatures Source # | |||||
Defined in Lightning.Protocol.BOLT3.Types type Rep ChannelFeatures = D1 ('MetaData "ChannelFeatures" "Lightning.Protocol.BOLT3.Types" "ppad-bolt3-0.0.1-BTVAwWY46FT4MsZtX0EtFp" 'False) (C1 ('MetaCons "ChannelFeatures" 'PrefixI 'True) (S1 ('MetaSel ('Just "cf_option_anchors") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))) | |||||
has_anchors :: ChannelFeatures -> Bool Source #
Check if option_anchors is enabled.
Transaction weights (constants)
commitment_weight_no_anchors :: Word64 Source #
Base commitment tx weight without option_anchors.
commitment_weight_anchors :: Word64 Source #
Base commitment tx weight with option_anchors.
htlc_timeout_weight_no_anchors :: Word64 Source #
HTLC-timeout tx weight without option_anchors.
htlc_timeout_weight_anchors :: Word64 Source #
HTLC-timeout tx weight with option_anchors.
htlc_success_weight_no_anchors :: Word64 Source #
HTLC-success tx weight without option_anchors.
htlc_success_weight_anchors :: Word64 Source #
HTLC-success tx weight with option_anchors.
htlc_output_weight :: Word64 Source #
Weight added per HTLC output in commitment tx.
Dust thresholds (constants)
dust_p2pkh :: Satoshi Source #
P2PKH dust threshold (546 satoshis).
dust_p2wpkh :: Satoshi Source #
P2WPKH dust threshold (294 satoshis).
dust_p2wsh :: Satoshi Source #
P2WSH dust threshold (330 satoshis).
anchor_output_value :: Satoshi Source #
Fixed anchor output value (330 satoshis).