| Copyright | (c) 2025 Jared Tobin |
|---|---|
| License | MIT |
| Maintainer | Jared Tobin <jared@ppad.tech> |
| Safe Haskell | None |
| Language | Haskell2010 |
Lightning.Protocol.BOLT7.Types
Description
Core types for BOLT #7 routing gossip.
Synopsis
- newtype ChainHash = ChainHash ByteString
- chainHash :: ByteString -> Maybe ChainHash
- unChainHash :: ChainHash -> ByteString
- mainnetChainHash :: ChainHash
- newtype ShortChannelId = ShortChannelId Word64
- shortChannelId :: Word32 -> Word32 -> Word16 -> Maybe ShortChannelId
- scidBlockHeight :: ShortChannelId -> Word32
- scidTxIndex :: ShortChannelId -> Word32
- scidOutputIndex :: ShortChannelId -> Word16
- scidWord64 :: ShortChannelId -> Word64
- scidFromBytes :: ByteString -> Maybe ShortChannelId
- scidToBytes :: ShortChannelId -> ByteString
- formatScid :: ShortChannelId -> String
- newtype ChannelId = ChannelId ByteString
- channelId :: ByteString -> Maybe ChannelId
- unChannelId :: ChannelId -> ByteString
- newtype Signature = Signature ByteString
- signature :: ByteString -> Maybe Signature
- unSignature :: Signature -> ByteString
- newtype Point = Point ByteString
- point :: ByteString -> Maybe Point
- unPoint :: Point -> ByteString
- 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 (re-exported from BOLT1)
A chain hash (32-byte hash identifying a blockchain).
Constructors
| ChainHash ByteString |
Instances
| NFData ChainHash | |||||
Defined in Lightning.Protocol.BOLT1.Prim | |||||
| Generic ChainHash | |||||
Defined in Lightning.Protocol.BOLT1.Prim Associated Types
| |||||
| Show ChainHash | |||||
| Eq ChainHash | |||||
| Ord ChainHash | |||||
| type Rep ChainHash | |||||
Defined in Lightning.Protocol.BOLT1.Prim type Rep ChainHash = D1 ('MetaData "ChainHash" "Lightning.Protocol.BOLT1.Prim" "ppad-bolt1-0.0.1-GZKMoPKBmjXD9cKQTWAWgW" 'True) (C1 ('MetaCons "ChainHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
chainHash :: ByteString -> Maybe ChainHash Source #
Construct a chain hash from a 32-byte bytestring.
Returns Nothing if the input is not exactly 32 bytes.
unChainHash :: ChainHash -> ByteString Source #
Extract the raw bytes from a chain hash.
mainnetChainHash :: ChainHash Source #
Bitcoin mainnet chain hash (genesis block hash, little-endian).
newtype ShortChannelId Source #
A short channel identifier (8 bytes packed as Word64).
Encodes block height (3 bytes), transaction index (3 bytes), and output index (2 bytes).
Constructors
| ShortChannelId Word64 |
Instances
Arguments
| :: Word32 | Block height (24 bits max) |
| -> Word32 | Transaction index (24 bits max) |
| -> Word16 | Output index |
| -> Maybe ShortChannelId |
Construct a ShortChannelId from components.
Returns Nothing if block height or tx index exceed 24 bits.
scidBlockHeight :: ShortChannelId -> Word32 Source #
Extract the block height from a ShortChannelId.
scidTxIndex :: ShortChannelId -> Word32 Source #
Extract the transaction index from a ShortChannelId.
scidOutputIndex :: ShortChannelId -> Word16 Source #
Extract the output index from a ShortChannelId.
scidWord64 :: ShortChannelId -> Word64 Source #
Extract the packed Word64 from a ShortChannelId.
scidFromBytes :: ByteString -> Maybe ShortChannelId Source #
Parse ShortChannelId from 8 big-endian bytes.
scidToBytes :: ShortChannelId -> ByteString Source #
Encode ShortChannelId as 8 big-endian bytes.
formatScid :: ShortChannelId -> String Source #
Format short channel ID as human-readable string.
A 32-byte channel identifier.
Constructors
| ChannelId ByteString |
Instances
| NFData ChannelId | |||||
Defined in Lightning.Protocol.BOLT1.Prim | |||||
| Generic ChannelId | |||||
Defined in Lightning.Protocol.BOLT1.Prim Associated Types
| |||||
| Show ChannelId | |||||
| Eq ChannelId | |||||
| Ord ChannelId | |||||
| type Rep ChannelId | |||||
Defined in Lightning.Protocol.BOLT1.Prim type Rep ChannelId = D1 ('MetaData "ChannelId" "Lightning.Protocol.BOLT1.Prim" "ppad-bolt1-0.0.1-GZKMoPKBmjXD9cKQTWAWgW" 'True) (C1 ('MetaCons "ChannelId" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
channelId :: ByteString -> Maybe ChannelId Source #
Construct a ChannelId from a 32-byte ByteString.
Returns Nothing if the input is not exactly 32 bytes.
unChannelId :: ChannelId -> ByteString Source #
Extract the raw bytes from a ChannelId.
Cryptographic types (re-exported from BOLT1)
A 64-byte compact ECDSA signature.
Constructors
| Signature ByteString |
Instances
| NFData Signature | |||||
Defined in Lightning.Protocol.BOLT1.Prim | |||||
| Generic Signature | |||||
Defined in Lightning.Protocol.BOLT1.Prim Associated Types
| |||||
| Show Signature | |||||
| Eq Signature | |||||
| Ord Signature | |||||
| type Rep Signature | |||||
Defined in Lightning.Protocol.BOLT1.Prim type Rep Signature = D1 ('MetaData "Signature" "Lightning.Protocol.BOLT1.Prim" "ppad-bolt1-0.0.1-GZKMoPKBmjXD9cKQTWAWgW" 'True) (C1 ('MetaCons "Signature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
signature :: ByteString -> Maybe Signature Source #
Construct a Signature from a 64-byte ByteString.
Returns Nothing if the input is not exactly 64 bytes.
unSignature :: Signature -> ByteString Source #
Extract the raw bytes from a Signature.
A 33-byte compressed secp256k1 public key.
Constructors
| Point ByteString |
Instances
| NFData Point | |||||
Defined in Lightning.Protocol.BOLT1.Prim | |||||
| Generic Point | |||||
Defined in Lightning.Protocol.BOLT1.Prim Associated Types
| |||||
| Show Point | |||||
| Eq Point | |||||
| Ord Point | |||||
| type Rep Point | |||||
Defined in Lightning.Protocol.BOLT1.Prim type Rep Point = D1 ('MetaData "Point" "Lightning.Protocol.BOLT1.Prim" "ppad-bolt1-0.0.1-GZKMoPKBmjXD9cKQTWAWgW" 'True) (C1 ('MetaCons "Point" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |||||
point :: ByteString -> Maybe Point Source #
Construct a Point from a 33-byte ByteString.
Returns Nothing if the input is not exactly 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).