| Copyright | (c) 2025 Jared Tobin |
|---|---|
| License | MIT |
| Maintainer | Jared Tobin <jared@ppad.tech> |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Lightning.Protocol.BOLT7.Types
Description
Core types for BOLT #7 routing gossip.
Synopsis
- data ChainHash
- chainHash :: ByteString -> Maybe ChainHash
- mainnetChainHash :: ChainHash
- data ShortChannelId
- shortChannelId :: ByteString -> Maybe ShortChannelId
- mkShortChannelId :: Word32 -> Word32 -> Word16 -> ShortChannelId
- scidBlockHeight :: ShortChannelId -> Word32
- scidTxIndex :: ShortChannelId -> Word32
- scidOutputIndex :: ShortChannelId -> Word16
- formatScid :: ShortChannelId -> String
- data ChannelId
- channelId :: ByteString -> Maybe ChannelId
- data Signature
- signature :: ByteString -> Maybe Signature
- data Point
- point :: ByteString -> Maybe Point
- data NodeId
- nodeId :: ByteString -> Maybe NodeId
- data RgbColor
- rgbColor :: ByteString -> Maybe RgbColor
- data Alias
- alias :: ByteString -> Maybe Alias
- type Timestamp = Word32
- data FeatureBits
- featureBits :: ByteString -> FeatureBits
- data Address
- data IPv4Addr
- ipv4Addr :: ByteString -> Maybe IPv4Addr
- data IPv6Addr
- ipv6Addr :: ByteString -> Maybe IPv6Addr
- data TorV3Addr
- torV3Addr :: ByteString -> Maybe TorV3Addr
- data MessageFlags = MessageFlags {
- mfHtlcMaxPresent :: !Bool
- encodeMessageFlags :: MessageFlags -> Word8
- decodeMessageFlags :: Word8 -> MessageFlags
- data ChannelFlags = ChannelFlags {
- cfDirection :: !Bool
- cfDisabled :: !Bool
- encodeChannelFlags :: ChannelFlags -> Word8
- decodeChannelFlags :: Word8 -> ChannelFlags
- newtype CltvExpiryDelta = CltvExpiryDelta {}
- newtype FeeBaseMsat = FeeBaseMsat {}
- newtype FeeProportionalMillionths = FeeProportionalMillionths {}
- newtype HtlcMinimumMsat = HtlcMinimumMsat {}
- newtype HtlcMaximumMsat = HtlcMaximumMsat {}
- chainHashLen :: Int
- shortChannelIdLen :: Int
- channelIdLen :: Int
- signatureLen :: Int
- pointLen :: Int
- nodeIdLen :: Int
- rgbColorLen :: Int
- aliasLen :: Int
- ipv4AddrLen :: Int
- ipv6AddrLen :: Int
- torV3AddrLen :: Int
Identifiers
Chain hash identifying the blockchain (32 bytes).
Instances
| NFData ChainHash Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| Generic ChainHash Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show ChainHash Source # | |||||
| Eq ChainHash Source # | |||||
| type Rep ChainHash Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep ChainHash = D1 ('MetaData "ChainHash" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "ChainHash" 'PrefixI 'True) (S1 ('MetaSel ('Just "getChainHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
chainHash :: ByteString -> Maybe ChainHash Source #
Smart constructor for ChainHash. Returns Nothing if not 32 bytes.
mainnetChainHash :: ChainHash Source #
Bitcoin mainnet chain hash (genesis block hash, little-endian).
This is the double-SHA256 of the mainnet genesis block header, reversed to little-endian byte order as used in the protocol.
data ShortChannelId Source #
Short channel ID (8 bytes): block height (3) + tx index (3) + output (2).
Instances
shortChannelId :: ByteString -> Maybe ShortChannelId Source #
Smart constructor for ShortChannelId. Returns Nothing if not 8 bytes.
Arguments
| :: Word32 | Block height (24 bits) |
| -> Word32 | Transaction index (24 bits) |
| -> Word16 | Output index |
| -> ShortChannelId |
Construct ShortChannelId from components.
Block height and tx index are truncated to 24 bits.
>>>mkShortChannelId 539268 845 1ShortChannelId {getShortChannelId = "\NUL\131\132\NUL\ETX-\NUL\SOH"}
scidBlockHeight :: ShortChannelId -> Word32 Source #
Extract block height from short channel ID (first 3 bytes, big-endian).
scidTxIndex :: ShortChannelId -> Word32 Source #
Extract transaction index from short channel ID (bytes 3-5, big-endian).
scidOutputIndex :: ShortChannelId -> Word16 Source #
Extract output index from short channel ID (last 2 bytes, big-endian).
formatScid :: ShortChannelId -> String Source #
Format short channel ID as human-readable string.
Uses the standard "block x tx x output" notation.
>>>formatScid (mkShortChannelId 539268 845 1)"539268x845x1"
Channel ID (32 bytes).
Instances
| NFData ChannelId Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| Generic ChannelId Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show ChannelId Source # | |||||
| Eq ChannelId Source # | |||||
| type Rep ChannelId Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep ChannelId = D1 ('MetaData "ChannelId" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "ChannelId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getChannelId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
channelId :: ByteString -> Maybe ChannelId Source #
Smart constructor for ChannelId. Returns Nothing if not 32 bytes.
Cryptographic types
Signature (64 bytes).
Instances
| NFData Signature Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| Generic Signature Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show Signature Source # | |||||
| Eq Signature Source # | |||||
| type Rep Signature Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep Signature = D1 ('MetaData "Signature" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "Signature" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSignature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
signature :: ByteString -> Maybe Signature Source #
Smart constructor for Signature. Returns Nothing if not 64 bytes.
Compressed public key (33 bytes).
Instances
| NFData Point Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| Generic Point Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show Point Source # | |||||
| Eq Point Source # | |||||
| type Rep Point Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep Point = D1 ('MetaData "Point" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "Point" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
point :: ByteString -> Maybe Point Source #
Smart constructor for Point. Returns Nothing if not 33 bytes.
Node ID (33 bytes, same as compressed public key).
Has Ord instance for lexicographic comparison (required by spec for channel announcements where node_id_1 < node_id_2).
Instances
| NFData NodeId Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| Generic NodeId Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show NodeId Source # | |||||
| Eq NodeId Source # | |||||
| Ord NodeId Source # | |||||
| type Rep NodeId Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep NodeId = D1 ('MetaData "NodeId" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "NodeId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getNodeId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
nodeId :: ByteString -> Maybe NodeId Source #
Smart constructor for NodeId. Returns Nothing if not 33 bytes.
Node metadata
RGB color (3 bytes).
Instances
| NFData RgbColor Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| Generic RgbColor Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show RgbColor Source # | |||||
| Eq RgbColor Source # | |||||
| type Rep RgbColor Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep RgbColor = D1 ('MetaData "RgbColor" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "RgbColor" 'PrefixI 'True) (S1 ('MetaSel ('Just "getRgbColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
rgbColor :: ByteString -> Maybe RgbColor Source #
Smart constructor for RgbColor. Returns Nothing if not 3 bytes.
Node alias (32 bytes, UTF-8 padded with zero bytes).
Instances
| NFData Alias Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| Generic Alias Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show Alias Source # | |||||
| Eq Alias Source # | |||||
| type Rep Alias Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep Alias = D1 ('MetaData "Alias" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "Alias" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAlias") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
alias :: ByteString -> Maybe Alias Source #
Smart constructor for Alias. Returns Nothing if not 32 bytes.
data FeatureBits Source #
Feature bits (variable length).
Instances
| NFData FeatureBits Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods rnf :: FeatureBits -> () # | |||||
| Generic FeatureBits Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show FeatureBits Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods showsPrec :: Int -> FeatureBits -> ShowS # show :: FeatureBits -> String # showList :: [FeatureBits] -> ShowS # | |||||
| Eq FeatureBits Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| type Rep FeatureBits Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep FeatureBits = D1 ('MetaData "FeatureBits" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "FeatureBits" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFeatureBits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
featureBits :: ByteString -> FeatureBits Source #
Smart constructor for FeatureBits (any length).
Address types
Network address with port.
Constructors
| AddrIPv4 !IPv4Addr !Word16 | IPv4 address + port |
| AddrIPv6 !IPv6Addr !Word16 | IPv6 address + port |
| AddrTorV3 !TorV3Addr !Word16 | Tor v3 address + port |
| AddrDNS !ByteString !Word16 | DNS hostname + port |
Instances
| NFData Address Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| Generic Address Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show Address Source # | |||||
| Eq Address Source # | |||||
| type Rep Address Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep Address = D1 ('MetaData "Address" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'False) ((C1 ('MetaCons "AddrIPv4" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IPv4Addr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16)) :+: C1 ('MetaCons "AddrIPv6" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IPv6Addr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16))) :+: (C1 ('MetaCons "AddrTorV3" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TorV3Addr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16)) :+: C1 ('MetaCons "AddrDNS" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16)))) | |||||
IPv4 address (4 bytes).
Instances
| NFData IPv4Addr Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| Generic IPv4Addr Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show IPv4Addr Source # | |||||
| Eq IPv4Addr Source # | |||||
| type Rep IPv4Addr Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep IPv4Addr = D1 ('MetaData "IPv4Addr" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "IPv4Addr" 'PrefixI 'True) (S1 ('MetaSel ('Just "getIPv4Addr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
ipv4Addr :: ByteString -> Maybe IPv4Addr Source #
Smart constructor for IPv4Addr. Returns Nothing if not 4 bytes.
IPv6 address (16 bytes).
Instances
| NFData IPv6Addr Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| Generic IPv6Addr Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show IPv6Addr Source # | |||||
| Eq IPv6Addr Source # | |||||
| type Rep IPv6Addr Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep IPv6Addr = D1 ('MetaData "IPv6Addr" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "IPv6Addr" 'PrefixI 'True) (S1 ('MetaSel ('Just "getIPv6Addr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
ipv6Addr :: ByteString -> Maybe IPv6Addr Source #
Smart constructor for IPv6Addr. Returns Nothing if not 16 bytes.
Tor v3 onion address (35 bytes: 32 pubkey + 2 checksum + 1 version).
Instances
| NFData TorV3Addr Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| Generic TorV3Addr Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show TorV3Addr Source # | |||||
| Eq TorV3Addr Source # | |||||
| type Rep TorV3Addr Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep TorV3Addr = D1 ('MetaData "TorV3Addr" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "TorV3Addr" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTorV3Addr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
torV3Addr :: ByteString -> Maybe TorV3Addr Source #
Smart constructor for TorV3Addr. Returns Nothing if not 35 bytes.
Channel update flags
data MessageFlags Source #
Message flags for channel_update.
Bit 0: htlc_maximum_msat field is present.
Constructors
| MessageFlags | |
Fields
| |
Instances
| NFData MessageFlags Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods rnf :: MessageFlags -> () # | |||||
| Generic MessageFlags Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show MessageFlags Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods showsPrec :: Int -> MessageFlags -> ShowS # show :: MessageFlags -> String # showList :: [MessageFlags] -> ShowS # | |||||
| Eq MessageFlags Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| type Rep MessageFlags Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep MessageFlags = D1 ('MetaData "MessageFlags" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'False) (C1 ('MetaCons "MessageFlags" 'PrefixI 'True) (S1 ('MetaSel ('Just "mfHtlcMaxPresent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))) | |||||
encodeMessageFlags :: MessageFlags -> Word8 Source #
Encode MessageFlags to Word8.
decodeMessageFlags :: Word8 -> MessageFlags Source #
Decode Word8 to MessageFlags.
data ChannelFlags Source #
Channel flags for channel_update.
Bit 0: direction (0 = node_id_1 is origin, 1 = node_id_2 is origin). Bit 1: disabled (1 = channel disabled).
Constructors
| ChannelFlags | |
Fields
| |
Instances
| NFData ChannelFlags Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods rnf :: ChannelFlags -> () # | |||||
| Generic ChannelFlags Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show ChannelFlags Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods showsPrec :: Int -> ChannelFlags -> ShowS # show :: ChannelFlags -> String # showList :: [ChannelFlags] -> ShowS # | |||||
| Eq ChannelFlags Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| type Rep ChannelFlags Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep ChannelFlags = D1 ('MetaData "ChannelFlags" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'False) (C1 ('MetaCons "ChannelFlags" 'PrefixI 'True) (S1 ('MetaSel ('Just "cfDirection") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "cfDisabled") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))) | |||||
encodeChannelFlags :: ChannelFlags -> Word8 Source #
Encode ChannelFlags to Word8.
decodeChannelFlags :: Word8 -> ChannelFlags Source #
Decode Word8 to ChannelFlags.
Routing parameters
newtype CltvExpiryDelta Source #
CLTV expiry delta.
Constructors
| CltvExpiryDelta | |
Fields | |
Instances
| NFData CltvExpiryDelta Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods rnf :: CltvExpiryDelta -> () # | |||||
| Generic CltvExpiryDelta Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
Methods from :: CltvExpiryDelta -> Rep CltvExpiryDelta x # to :: Rep CltvExpiryDelta x -> CltvExpiryDelta # | |||||
| Show CltvExpiryDelta Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods showsPrec :: Int -> CltvExpiryDelta -> ShowS # show :: CltvExpiryDelta -> String # showList :: [CltvExpiryDelta] -> ShowS # | |||||
| Eq CltvExpiryDelta Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods (==) :: CltvExpiryDelta -> CltvExpiryDelta -> Bool # (/=) :: CltvExpiryDelta -> CltvExpiryDelta -> Bool # | |||||
| Ord CltvExpiryDelta Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods compare :: CltvExpiryDelta -> CltvExpiryDelta -> Ordering # (<) :: CltvExpiryDelta -> CltvExpiryDelta -> Bool # (<=) :: CltvExpiryDelta -> CltvExpiryDelta -> Bool # (>) :: CltvExpiryDelta -> CltvExpiryDelta -> Bool # (>=) :: CltvExpiryDelta -> CltvExpiryDelta -> Bool # max :: CltvExpiryDelta -> CltvExpiryDelta -> CltvExpiryDelta # min :: CltvExpiryDelta -> CltvExpiryDelta -> CltvExpiryDelta # | |||||
| type Rep CltvExpiryDelta Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep CltvExpiryDelta = D1 ('MetaData "CltvExpiryDelta" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "CltvExpiryDelta" 'PrefixI 'True) (S1 ('MetaSel ('Just "getCltvExpiryDelta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16))) | |||||
newtype FeeBaseMsat Source #
Base fee in millisatoshis.
Constructors
| FeeBaseMsat | |
Fields | |
Instances
| NFData FeeBaseMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods rnf :: FeeBaseMsat -> () # | |||||
| Generic FeeBaseMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
| |||||
| Show FeeBaseMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods showsPrec :: Int -> FeeBaseMsat -> ShowS # show :: FeeBaseMsat -> String # showList :: [FeeBaseMsat] -> ShowS # | |||||
| Eq FeeBaseMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types | |||||
| Ord FeeBaseMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods compare :: FeeBaseMsat -> FeeBaseMsat -> Ordering # (<) :: FeeBaseMsat -> FeeBaseMsat -> Bool # (<=) :: FeeBaseMsat -> FeeBaseMsat -> Bool # (>) :: FeeBaseMsat -> FeeBaseMsat -> Bool # (>=) :: FeeBaseMsat -> FeeBaseMsat -> Bool # max :: FeeBaseMsat -> FeeBaseMsat -> FeeBaseMsat # min :: FeeBaseMsat -> FeeBaseMsat -> FeeBaseMsat # | |||||
| type Rep FeeBaseMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep FeeBaseMsat = D1 ('MetaData "FeeBaseMsat" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "FeeBaseMsat" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFeeBaseMsat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))) | |||||
newtype FeeProportionalMillionths Source #
Proportional fee in millionths.
Constructors
| FeeProportionalMillionths | |
Fields | |
Instances
| NFData FeeProportionalMillionths Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods rnf :: FeeProportionalMillionths -> () # | |||||
| Generic FeeProportionalMillionths Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
Methods from :: FeeProportionalMillionths -> Rep FeeProportionalMillionths x # to :: Rep FeeProportionalMillionths x -> FeeProportionalMillionths # | |||||
| Show FeeProportionalMillionths Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods showsPrec :: Int -> FeeProportionalMillionths -> ShowS # show :: FeeProportionalMillionths -> String # showList :: [FeeProportionalMillionths] -> ShowS # | |||||
| Eq FeeProportionalMillionths Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods (==) :: FeeProportionalMillionths -> FeeProportionalMillionths -> Bool # (/=) :: FeeProportionalMillionths -> FeeProportionalMillionths -> Bool # | |||||
| Ord FeeProportionalMillionths Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods compare :: FeeProportionalMillionths -> FeeProportionalMillionths -> Ordering # (<) :: FeeProportionalMillionths -> FeeProportionalMillionths -> Bool # (<=) :: FeeProportionalMillionths -> FeeProportionalMillionths -> Bool # (>) :: FeeProportionalMillionths -> FeeProportionalMillionths -> Bool # (>=) :: FeeProportionalMillionths -> FeeProportionalMillionths -> Bool # max :: FeeProportionalMillionths -> FeeProportionalMillionths -> FeeProportionalMillionths # min :: FeeProportionalMillionths -> FeeProportionalMillionths -> FeeProportionalMillionths # | |||||
| type Rep FeeProportionalMillionths Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep FeeProportionalMillionths = D1 ('MetaData "FeeProportionalMillionths" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "FeeProportionalMillionths" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFeeProportionalMillionths") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))) | |||||
newtype HtlcMinimumMsat Source #
Minimum HTLC value in millisatoshis.
Constructors
| HtlcMinimumMsat | |
Fields | |
Instances
| NFData HtlcMinimumMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods rnf :: HtlcMinimumMsat -> () # | |||||
| Generic HtlcMinimumMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
Methods from :: HtlcMinimumMsat -> Rep HtlcMinimumMsat x # to :: Rep HtlcMinimumMsat x -> HtlcMinimumMsat # | |||||
| Show HtlcMinimumMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods showsPrec :: Int -> HtlcMinimumMsat -> ShowS # show :: HtlcMinimumMsat -> String # showList :: [HtlcMinimumMsat] -> ShowS # | |||||
| Eq HtlcMinimumMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods (==) :: HtlcMinimumMsat -> HtlcMinimumMsat -> Bool # (/=) :: HtlcMinimumMsat -> HtlcMinimumMsat -> Bool # | |||||
| Ord HtlcMinimumMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods compare :: HtlcMinimumMsat -> HtlcMinimumMsat -> Ordering # (<) :: HtlcMinimumMsat -> HtlcMinimumMsat -> Bool # (<=) :: HtlcMinimumMsat -> HtlcMinimumMsat -> Bool # (>) :: HtlcMinimumMsat -> HtlcMinimumMsat -> Bool # (>=) :: HtlcMinimumMsat -> HtlcMinimumMsat -> Bool # max :: HtlcMinimumMsat -> HtlcMinimumMsat -> HtlcMinimumMsat # min :: HtlcMinimumMsat -> HtlcMinimumMsat -> HtlcMinimumMsat # | |||||
| type Rep HtlcMinimumMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep HtlcMinimumMsat = D1 ('MetaData "HtlcMinimumMsat" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "HtlcMinimumMsat" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHtlcMinimumMsat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||
newtype HtlcMaximumMsat Source #
Maximum HTLC value in millisatoshis.
Constructors
| HtlcMaximumMsat | |
Fields | |
Instances
| NFData HtlcMaximumMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods rnf :: HtlcMaximumMsat -> () # | |||||
| Generic HtlcMaximumMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Associated Types
Methods from :: HtlcMaximumMsat -> Rep HtlcMaximumMsat x # to :: Rep HtlcMaximumMsat x -> HtlcMaximumMsat # | |||||
| Show HtlcMaximumMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods showsPrec :: Int -> HtlcMaximumMsat -> ShowS # show :: HtlcMaximumMsat -> String # showList :: [HtlcMaximumMsat] -> ShowS # | |||||
| Eq HtlcMaximumMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods (==) :: HtlcMaximumMsat -> HtlcMaximumMsat -> Bool # (/=) :: HtlcMaximumMsat -> HtlcMaximumMsat -> Bool # | |||||
| Ord HtlcMaximumMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types Methods compare :: HtlcMaximumMsat -> HtlcMaximumMsat -> Ordering # (<) :: HtlcMaximumMsat -> HtlcMaximumMsat -> Bool # (<=) :: HtlcMaximumMsat -> HtlcMaximumMsat -> Bool # (>) :: HtlcMaximumMsat -> HtlcMaximumMsat -> Bool # (>=) :: HtlcMaximumMsat -> HtlcMaximumMsat -> Bool # max :: HtlcMaximumMsat -> HtlcMaximumMsat -> HtlcMaximumMsat # min :: HtlcMaximumMsat -> HtlcMaximumMsat -> HtlcMaximumMsat # | |||||
| type Rep HtlcMaximumMsat Source # | |||||
Defined in Lightning.Protocol.BOLT7.Types type Rep HtlcMaximumMsat = D1 ('MetaData "HtlcMaximumMsat" "Lightning.Protocol.BOLT7.Types" "ppad-bolt7-0.0.1-9AmpjHUse7iEtxOkiaMheY" 'True) (C1 ('MetaCons "HtlcMaximumMsat" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHtlcMaximumMsat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||
Constants
chainHashLen :: Int Source #
Length of a chain hash (32 bytes).
shortChannelIdLen :: Int Source #
Length of a short channel ID (8 bytes).
channelIdLen :: Int Source #
Length of a channel ID (32 bytes).
signatureLen :: Int Source #
Length of a signature (64 bytes).
rgbColorLen :: Int Source #
Length of RGB color (3 bytes).
ipv4AddrLen :: Int Source #
Length of IPv4 address (4 bytes).
ipv6AddrLen :: Int Source #
Length of IPv6 address (16 bytes).
torV3AddrLen :: Int Source #
Length of Tor v3 address (35 bytes).