libp2p-hs-0.1.0.0: Haskell implementation of the libp2p networking stack
Safe HaskellNone
LanguageGHC2021

Network.LibP2P.Multiaddr.Codec

Description

Binary and text encoding/decoding for multiaddr.

Synopsis

Documentation

encodeProtocols :: [Protocol] -> ByteString Source #

Encode a list of protocols to binary multiaddr format.

decodeProtocols :: ByteString -> Either String [Protocol] Source #

Decode binary multiaddr format to a list of protocols.

protocolsToText :: [Protocol] -> Text Source #

Convert a list of protocols to human-readable text form.

textToProtocols :: Text -> Either String [Protocol] Source #

Parse human-readable text form to a list of protocols.