simplexmq-6.5.0.16: SimpleXMQ message broker
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simplex.Messaging.Encoding

Synopsis

Documentation

class Encoding a where Source #

SMP protocol encoding

Minimal complete definition

smpEncode, (smpDecode | smpP)

Methods

smpEncode :: a -> ByteString Source #

protocol encoding of type (default implementation uses protocol ByteString encoding)

smpDecode :: ByteString -> Either String a Source #

decoding of type (default implementation uses parser)

smpP :: Parser a Source #

protocol parser of type (default implementation parses protocol ByteString encoding)

Instances

Instances details
Encoding Int64 Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: Int64 -> ByteString Source #

smpDecode :: ByteString -> Either String Int64 Source #

smpP :: Parser Int64 Source #

Encoding Word16 Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: Word16 -> ByteString Source #

smpDecode :: ByteString -> Either String Word16 Source #

smpP :: Parser Word16 Source #

Encoding Word32 Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: Word32 -> ByteString Source #

smpDecode :: ByteString -> Either String Word32 Source #

smpP :: Parser Word32 Source #

Encoding ByteString Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: ByteString -> ByteString Source #

smpDecode :: ByteString -> Either String ByteString Source #

smpP :: Parser ByteString Source #

Encoding FileInfo Source # 
Instance details

Defined in Simplex.FileTransfer.Protocol

Methods

smpEncode :: FileInfo -> ByteString Source #

smpDecode :: ByteString -> Either String FileInfo Source #

smpP :: Parser FileInfo Source #

Encoding XFTPClientHandshake Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Methods

smpEncode :: XFTPClientHandshake -> ByteString Source #

smpDecode :: ByteString -> Either String XFTPClientHandshake Source #

smpP :: Parser XFTPClientHandshake Source #

Encoding XFTPClientHello Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Methods

smpEncode :: XFTPClientHello -> ByteString Source #

smpDecode :: ByteString -> Either String XFTPClientHello Source #

smpP :: Parser XFTPClientHello Source #

Encoding XFTPErrorType Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Methods

smpEncode :: XFTPErrorType -> ByteString Source #

smpDecode :: ByteString -> Either String XFTPErrorType Source #

smpP :: Parser XFTPErrorType Source #

Encoding XFTPServerHandshake Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Methods

smpEncode :: XFTPServerHandshake -> ByteString Source #

smpDecode :: ByteString -> Either String XFTPServerHandshake Source #

smpP :: Parser XFTPServerHandshake Source #

Encoding FileHeader Source # 
Instance details

Defined in Simplex.FileTransfer.Types

Methods

smpEncode :: FileHeader -> ByteString Source #

smpDecode :: ByteString -> Either String FileHeader Source #

smpP :: Parser FileHeader Source #

Encoding AConnLinkData Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: AConnLinkData -> ByteString Source #

smpDecode :: ByteString -> Either String AConnLinkData Source #

smpP :: Parser AConnLinkData Source #

Encoding AConnShortLink Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: AConnShortLink -> ByteString Source #

smpDecode :: ByteString -> Either String AConnShortLink Source #

smpP :: Parser AConnShortLink Source #

Encoding AConnectionRequestUri Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: AConnectionRequestUri -> ByteString Source #

smpDecode :: ByteString -> Either String AConnectionRequestUri Source #

smpP :: Parser AConnectionRequestUri Source #

Encoding AMessage Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: AMessage -> ByteString Source #

smpDecode :: ByteString -> Either String AMessage Source #

smpP :: Parser AMessage Source #

Encoding AMessageReceipt Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: AMessageReceipt -> ByteString Source #

smpDecode :: ByteString -> Either String AMessageReceipt Source #

smpP :: Parser AMessageReceipt Source #

Encoding APrivHeader Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: APrivHeader -> ByteString Source #

smpDecode :: ByteString -> Either String APrivHeader Source #

smpP :: Parser APrivHeader Source #

Encoding AUserConnLinkData Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: AUserConnLinkData -> ByteString Source #

smpDecode :: ByteString -> Either String AUserConnLinkData Source #

smpP :: Parser AUserConnLinkData Source #

Encoding AgentMessage Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: AgentMessage -> ByteString Source #

smpDecode :: ByteString -> Either String AgentMessage Source #

smpP :: Parser AgentMessage Source #

Encoding AgentMessageType Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: AgentMessageType -> ByteString Source #

smpDecode :: ByteString -> Either String AgentMessageType Source #

smpP :: Parser AgentMessageType Source #

Encoding AgentMsgEnvelope Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: AgentMsgEnvelope -> ByteString Source #

smpDecode :: ByteString -> Either String AgentMsgEnvelope Source #

smpP :: Parser AgentMsgEnvelope Source #

Encoding ConnReqUriData Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: ConnReqUriData -> ByteString Source #

smpDecode :: ByteString -> Either String ConnReqUriData Source #

smpP :: Parser ConnReqUriData Source #

Encoding ConnectionMode Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: ConnectionMode -> ByteString Source #

smpDecode :: ByteString -> Either String ConnectionMode Source #

smpP :: Parser ConnectionMode Source #

Encoding OwnerAuth Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: OwnerAuth -> ByteString Source #

smpDecode :: ByteString -> Either String OwnerAuth Source #

smpP :: Parser OwnerAuth Source #

Encoding SMPQueueInfo Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: SMPQueueInfo -> ByteString Source #

smpDecode :: ByteString -> Either String SMPQueueInfo Source #

smpP :: Parser SMPQueueInfo Source #

Encoding SMPQueueUri Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: SMPQueueUri -> ByteString Source #

smpDecode :: ByteString -> Either String SMPQueueUri Source #

smpP :: Parser SMPQueueUri Source #

Encoding UserContactData Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: UserContactData -> ByteString Source #

smpDecode :: ByteString -> Either String UserContactData Source #

smpP :: Parser UserContactData Source #

Encoding UserLinkData Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: UserLinkData -> ByteString Source #

smpDecode :: ByteString -> Either String UserLinkData Source #

smpP :: Parser UserLinkData Source #

Encoding Compressed Source # 
Instance details

Defined in Simplex.Messaging.Compression

Methods

smpEncode :: Compressed -> ByteString Source #

smpDecode :: ByteString -> Either String Compressed Source #

smpP :: Parser Compressed Source #

Encoding APrivateAuthKey Source # 
Instance details

Defined in Simplex.Messaging.Crypto

Methods

smpEncode :: APrivateAuthKey -> ByteString Source #

smpDecode :: ByteString -> Either String APrivateAuthKey Source #

smpP :: Parser APrivateAuthKey Source #

Encoding APrivateSignKey Source # 
Instance details

Defined in Simplex.Messaging.Crypto

Methods

smpEncode :: APrivateSignKey -> ByteString Source #

smpDecode :: ByteString -> Either String APrivateSignKey Source #

smpP :: Parser APrivateSignKey Source #

Encoding APublicAuthKey Source # 
Instance details

Defined in Simplex.Messaging.Crypto

Methods

smpEncode :: APublicAuthKey -> ByteString Source #

smpDecode :: ByteString -> Either String APublicAuthKey Source #

smpP :: Parser APublicAuthKey Source #

Encoding APublicDhKey Source # 
Instance details

Defined in Simplex.Messaging.Crypto

Methods

smpEncode :: APublicDhKey -> ByteString Source #

smpDecode :: ByteString -> Either String APublicDhKey Source #

smpP :: Parser APublicDhKey Source #

Encoding APublicKey Source # 
Instance details

Defined in Simplex.Messaging.Crypto

Methods

smpEncode :: APublicKey -> ByteString Source #

smpDecode :: ByteString -> Either String APublicKey Source #

smpP :: Parser APublicKey Source #

Encoding APublicVerifyKey Source # 
Instance details

Defined in Simplex.Messaging.Crypto

Methods

smpEncode :: APublicVerifyKey -> ByteString Source #

smpDecode :: ByteString -> Either String APublicVerifyKey Source #

smpP :: Parser APublicVerifyKey Source #

Encoding AuthTag Source # 
Instance details

Defined in Simplex.Messaging.Crypto

Methods

smpEncode :: AuthTag -> ByteString Source #

smpDecode :: ByteString -> Either String AuthTag Source #

smpP :: Parser AuthTag Source #

Encoding CbNonce Source # 
Instance details

Defined in Simplex.Messaging.Crypto

Methods

smpEncode :: CbNonce -> ByteString Source #

smpDecode :: ByteString -> Either String CbNonce Source #

smpP :: Parser CbNonce Source #

Encoding IV Source # 
Instance details

Defined in Simplex.Messaging.Crypto

Methods

smpEncode :: IV -> ByteString Source #

smpDecode :: ByteString -> Either String IV Source #

smpP :: Parser IV Source #

Encoding KeyHash Source # 
Instance details

Defined in Simplex.Messaging.Crypto

Methods

smpEncode :: KeyHash -> ByteString Source #

smpDecode :: ByteString -> Either String KeyHash Source #

smpP :: Parser KeyHash Source #

Encoding APrivRKEMParams Source # 
Instance details

Defined in Simplex.Messaging.Crypto.Ratchet

Methods

smpEncode :: APrivRKEMParams -> ByteString Source #

smpDecode :: ByteString -> Either String APrivRKEMParams Source #

smpP :: Parser APrivRKEMParams Source #

Encoding ARKEMParams Source # 
Instance details

Defined in Simplex.Messaging.Crypto.Ratchet

Methods

smpEncode :: ARKEMParams -> ByteString Source #

smpDecode :: ByteString -> Either String ARKEMParams Source #

smpP :: Parser ARKEMParams Source #

Encoding KEMCiphertext Source # 
Instance details

Defined in Simplex.Messaging.Crypto.SNTRUP761.Bindings

Methods

smpEncode :: KEMCiphertext -> ByteString Source #

smpDecode :: ByteString -> Either String KEMCiphertext Source #

smpP :: Parser KEMCiphertext Source #

Encoding KEMPublicKey Source # 
Instance details

Defined in Simplex.Messaging.Crypto.SNTRUP761.Bindings

Methods

smpEncode :: KEMPublicKey -> ByteString Source #

smpDecode :: ByteString -> Either String KEMPublicKey Source #

smpP :: Parser KEMPublicKey Source #

Encoding KEMSecretKey Source # 
Instance details

Defined in Simplex.Messaging.Crypto.SNTRUP761.Bindings

Methods

smpEncode :: KEMSecretKey -> ByteString Source #

smpDecode :: ByteString -> Either String KEMSecretKey Source #

smpP :: Parser KEMSecretKey Source #

Encoding KEMSharedKey Source # 
Instance details

Defined in Simplex.Messaging.Crypto.SNTRUP761.Bindings

Methods

smpEncode :: KEMSharedKey -> ByteString Source #

smpDecode :: ByteString -> Either String KEMSharedKey Source #

smpP :: Parser KEMSharedKey Source #

Encoding Large Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: Large -> ByteString Source #

smpDecode :: ByteString -> Either String Large Source #

smpP :: Parser Large Source #

Encoding Tail Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: Tail -> ByteString Source #

smpDecode :: ByteString -> Either String Tail Source #

smpP :: Parser Tail Source #

Encoding ANewNtfEntity Source # 
Instance details

Defined in Simplex.Messaging.Notifications.Protocol

Methods

smpEncode :: ANewNtfEntity -> ByteString Source #

smpDecode :: ByteString -> Either String ANewNtfEntity Source #

smpP :: Parser ANewNtfEntity Source #

Encoding DeviceToken Source # 
Instance details

Defined in Simplex.Messaging.Notifications.Protocol

Methods

smpEncode :: DeviceToken -> ByteString Source #

smpDecode :: ByteString -> Either String DeviceToken Source #

smpP :: Parser DeviceToken Source #

Encoding NTInvalidReason Source # 
Instance details

Defined in Simplex.Messaging.Notifications.Protocol

Methods

smpEncode :: NTInvalidReason -> ByteString Source #

smpDecode :: ByteString -> Either String NTInvalidReason Source #

smpP :: Parser NTInvalidReason Source #

Encoding NtfCmdTag Source # 
Instance details

Defined in Simplex.Messaging.Notifications.Protocol

Methods

smpEncode :: NtfCmdTag -> ByteString Source #

smpDecode :: ByteString -> Either String NtfCmdTag Source #

smpP :: Parser NtfCmdTag Source #

Encoding NtfRegCode Source # 
Instance details

Defined in Simplex.Messaging.Notifications.Protocol

Methods

smpEncode :: NtfRegCode -> ByteString Source #

smpDecode :: ByteString -> Either String NtfRegCode Source #

smpP :: Parser NtfRegCode Source #

Encoding NtfResponseTag Source # 
Instance details

Defined in Simplex.Messaging.Notifications.Protocol

Methods

smpEncode :: NtfResponseTag -> ByteString Source #

smpDecode :: ByteString -> Either String NtfResponseTag Source #

smpP :: Parser NtfResponseTag Source #

Encoding NtfSubStatus Source # 
Instance details

Defined in Simplex.Messaging.Notifications.Protocol

Methods

smpEncode :: NtfSubStatus -> ByteString Source #

smpDecode :: ByteString -> Either String NtfSubStatus Source #

smpP :: Parser NtfSubStatus Source #

Encoding NtfTknStatus Source # 
Instance details

Defined in Simplex.Messaging.Notifications.Protocol

Methods

smpEncode :: NtfTknStatus -> ByteString Source #

smpDecode :: ByteString -> Either String NtfTknStatus Source #

smpP :: Parser NtfTknStatus Source #

Encoding PushProvider Source # 
Instance details

Defined in Simplex.Messaging.Notifications.Protocol

Methods

smpEncode :: PushProvider -> ByteString Source #

smpDecode :: ByteString -> Either String PushProvider Source #

smpP :: Parser PushProvider Source #

Encoding SMPQueueNtf Source # 
Instance details

Defined in Simplex.Messaging.Notifications.Protocol

Methods

smpEncode :: SMPQueueNtf -> ByteString Source #

smpDecode :: ByteString -> Either String SMPQueueNtf Source #

smpP :: Parser SMPQueueNtf Source #

Encoding NtfAgentSubStatus Source # 
Instance details

Defined in Simplex.Messaging.Notifications.Types

Methods

smpEncode :: NtfAgentSubStatus -> ByteString Source #

smpDecode :: ByteString -> Either String NtfAgentSubStatus Source #

smpP :: Parser NtfAgentSubStatus Source #

Encoding NtfTknAction Source # 
Instance details

Defined in Simplex.Messaging.Notifications.Types

Methods

smpEncode :: NtfTknAction -> ByteString Source #

smpDecode :: ByteString -> Either String NtfTknAction Source #

smpP :: Parser NtfTknAction Source #

Encoding ASubscriberParty Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: ASubscriberParty -> ByteString Source #

smpDecode :: ByteString -> Either String ASubscriberParty Source #

smpP :: Parser ASubscriberParty Source #

Encoding BasicAuth Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: BasicAuth -> ByteString Source #

smpDecode :: ByteString -> Either String BasicAuth Source #

smpP :: Parser BasicAuth Source #

Encoding BlockingInfo Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: BlockingInfo -> ByteString Source #

smpDecode :: ByteString -> Either String BlockingInfo Source #

smpP :: Parser BlockingInfo Source #

Encoding BrokerErrorType Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: BrokerErrorType -> ByteString Source #

smpDecode :: ByteString -> Either String BrokerErrorType Source #

smpP :: Parser BrokerErrorType Source #

Encoding BrokerMsgTag Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: BrokerMsgTag -> ByteString Source #

smpDecode :: ByteString -> Either String BrokerMsgTag Source #

smpP :: Parser BrokerMsgTag Source #

Encoding ClientMessage Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: ClientMessage -> ByteString Source #

smpDecode :: ByteString -> Either String ClientMessage Source #

smpP :: Parser ClientMessage Source #

Encoding ClientMsgEnvelope Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: ClientMsgEnvelope -> ByteString Source #

smpDecode :: ByteString -> Either String ClientMsgEnvelope Source #

smpP :: Parser ClientMsgEnvelope Source #

Encoding CommandError Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: CommandError -> ByteString Source #

smpDecode :: ByteString -> Either String CommandError Source #

smpP :: Parser CommandError Source #

Encoding CorrId Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: CorrId -> ByteString Source #

smpDecode :: ByteString -> Either String CorrId Source #

smpP :: Parser CorrId Source #

Encoding EncDataBytes Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: EncDataBytes -> ByteString Source #

smpDecode :: ByteString -> Either String EncDataBytes Source #

smpP :: Parser EncDataBytes Source #

Encoding ErrorType Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: ErrorType -> ByteString Source #

smpDecode :: ByteString -> Either String ErrorType Source #

smpP :: Parser ErrorType Source #

Encoding FwdResponse Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: FwdResponse -> ByteString Source #

smpDecode :: ByteString -> Either String FwdResponse Source #

smpP :: Parser FwdResponse Source #

Encoding FwdTransmission Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: FwdTransmission -> ByteString Source #

smpDecode :: ByteString -> Either String FwdTransmission Source #

smpP :: Parser FwdTransmission Source #

Encoding MsgFlags Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: MsgFlags -> ByteString Source #

smpDecode :: ByteString -> Either String MsgFlags Source #

smpP :: Parser MsgFlags Source #

Encoding NMsgMeta Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: NMsgMeta -> ByteString Source #

smpDecode :: ByteString -> Either String NMsgMeta Source #

smpP :: Parser NMsgMeta Source #

Encoding NetworkError Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: NetworkError -> ByteString Source #

smpDecode :: ByteString -> Either String NetworkError Source #

smpP :: Parser NetworkError Source #

Encoding NewNtfCreds Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: NewNtfCreds -> ByteString Source #

smpDecode :: ByteString -> Either String NewNtfCreds Source #

smpP :: Parser NewNtfCreds Source #

Encoding PrivHeader Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: PrivHeader -> ByteString Source #

smpDecode :: ByteString -> Either String PrivHeader Source #

smpP :: Parser PrivHeader Source #

Encoding ProxyError Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: ProxyError -> ByteString Source #

smpDecode :: ByteString -> Either String ProxyError Source #

smpP :: Parser ProxyError Source #

Encoding PubHeader Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: PubHeader -> ByteString Source #

smpDecode :: ByteString -> Either String PubHeader Source #

smpP :: Parser PubHeader Source #

Encoding QueueReqData Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: QueueReqData -> ByteString Source #

smpDecode :: ByteString -> Either String QueueReqData Source #

smpP :: Parser QueueReqData Source #

Encoding ServerNtfCreds Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: ServerNtfCreds -> ByteString Source #

smpDecode :: ByteString -> Either String ServerNtfCreds Source #

smpP :: Parser ServerNtfCreds Source #

Encoding SubscriptionMode Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: SubscriptionMode -> ByteString Source #

smpDecode :: ByteString -> Either String SubscriptionMode Source #

smpP :: Parser SubscriptionMode Source #

Encoding QueueInfo Source # 
Instance details

Defined in Simplex.Messaging.Server.QueueStore.QueueInfo

Methods

smpEncode :: QueueInfo -> ByteString Source #

smpDecode :: ByteString -> Either String QueueInfo Source #

smpP :: Parser QueueInfo Source #

Encoding QueueMode Source # 
Instance details

Defined in Simplex.Messaging.Server.QueueStore.QueueInfo

Methods

smpEncode :: QueueMode -> ByteString Source #

smpDecode :: ByteString -> Either String QueueMode Source #

smpP :: Parser QueueMode Source #

Encoding CertChainPubKey Source # 
Instance details

Defined in Simplex.Messaging.Transport

Methods

smpEncode :: CertChainPubKey -> ByteString Source #

smpDecode :: ByteString -> Either String CertChainPubKey Source #

smpP :: Parser CertChainPubKey Source #

Encoding EntityId Source # 
Instance details

Defined in Simplex.Messaging.Transport

Methods

smpEncode :: EntityId -> ByteString Source #

smpDecode :: ByteString -> Either String EntityId Source #

smpP :: Parser EntityId Source #

Encoding SMPServiceRole Source # 
Instance details

Defined in Simplex.Messaging.Transport

Methods

smpEncode :: SMPServiceRole -> ByteString Source #

smpDecode :: ByteString -> Either String SMPServiceRole Source #

smpP :: Parser SMPServiceRole Source #

Encoding TransportError Source # 
Instance details

Defined in Simplex.Messaging.Transport

Methods

smpEncode :: TransportError -> ByteString Source #

smpDecode :: ByteString -> Either String TransportError Source #

smpP :: Parser TransportError Source #

Encoding TransportHost Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

smpEncode :: TransportHost -> ByteString Source #

smpDecode :: ByteString -> Either String TransportHost Source #

smpP :: Parser TransportHost Source #

Encoding RCEncInvitation Source # 
Instance details

Defined in Simplex.RemoteControl.Invitation

Methods

smpEncode :: RCEncInvitation -> ByteString Source #

smpDecode :: ByteString -> Either String RCEncInvitation Source #

smpP :: Parser RCEncInvitation Source #

Encoding RCCtrlEncHello Source # 
Instance details

Defined in Simplex.RemoteControl.Types

Methods

smpEncode :: RCCtrlEncHello -> ByteString Source #

smpDecode :: ByteString -> Either String RCCtrlEncHello Source #

smpP :: Parser RCCtrlEncHello Source #

Encoding RCHostEncHello Source # 
Instance details

Defined in Simplex.RemoteControl.Types

Methods

smpEncode :: RCHostEncHello -> ByteString Source #

smpDecode :: ByteString -> Either String RCHostEncHello Source #

smpP :: Parser RCHostEncHello Source #

Encoding Text Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: Text -> ByteString Source #

smpDecode :: ByteString -> Either String Text Source #

smpP :: Parser Text Source #

Encoding SystemTime Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: SystemTime -> ByteString Source #

smpDecode :: ByteString -> Either String SystemTime Source #

smpP :: Parser SystemTime Source #

Encoding String Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: String -> ByteString Source #

smpDecode :: ByteString -> Either String String Source #

smpP :: Parser String Source #

Encoding Bool Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: Bool -> ByteString Source #

smpDecode :: ByteString -> Either String Bool Source #

smpP :: Parser Bool Source #

Encoding Char Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: Char -> ByteString Source #

smpDecode :: ByteString -> Either String Char Source #

smpP :: Parser Char Source #

Encoding a => Encoding (NonEmpty a) Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: NonEmpty a -> ByteString Source #

smpDecode :: ByteString -> Either String (NonEmpty a) Source #

smpP :: Parser (NonEmpty a) Source #

ConnectionModeI c => Encoding (ConnLinkData c) Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: ConnLinkData c -> ByteString Source #

smpDecode :: ByteString -> Either String (ConnLinkData c) Source #

smpP :: Parser (ConnLinkData c) Source #

ConnectionModeI m => Encoding (ConnShortLink m) Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: ConnShortLink m -> ByteString Source #

smpDecode :: ByteString -> Either String (ConnShortLink m) Source #

smpP :: Parser (ConnShortLink m) Source #

ConnectionModeI m => Encoding (ConnectionRequestUri m) Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: ConnectionRequestUri m -> ByteString Source #

smpDecode :: ByteString -> Either String (ConnectionRequestUri m) Source #

smpP :: Parser (ConnectionRequestUri m) Source #

ConnectionModeI c => Encoding (FixedLinkData c) Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: FixedLinkData c -> ByteString Source #

smpDecode :: ByteString -> Either String (FixedLinkData c) Source #

smpP :: Parser (FixedLinkData c) Source #

ConnectionModeI c => Encoding (UserConnLinkData c) Source # 
Instance details

Defined in Simplex.Messaging.Agent.Protocol

Methods

smpEncode :: UserConnLinkData c -> ByteString Source #

smpDecode :: ByteString -> Either String (UserConnLinkData c) Source #

smpP :: Parser (UserConnLinkData c) Source #

KnownNat i => Encoding (MaxLenBS i) Source # 
Instance details

Defined in Simplex.Messaging.Crypto

Methods

smpEncode :: MaxLenBS i -> ByteString Source #

smpDecode :: ByteString -> Either String (MaxLenBS i) Source #

smpP :: Parser (MaxLenBS i) Source #

AlgorithmI a => Encoding (PublicKey a) Source # 
Instance details

Defined in Simplex.Messaging.Crypto

Methods

smpEncode :: PublicKey a -> ByteString Source #

smpDecode :: ByteString -> Either String (PublicKey a) Source #

smpP :: Parser (PublicKey a) Source #

CryptoSignature (Signature s) => Encoding (Signature s) Source # 
Instance details

Defined in Simplex.Messaging.Crypto

Methods

smpEncode :: Signature s -> ByteString Source #

smpDecode :: ByteString -> Either String (Signature s) Source #

smpP :: Parser (Signature s) Source #

(Eq a, Show a, ASN1Object a) => Encoding (SignedObject a) Source # 
Instance details

Defined in Simplex.Messaging.Crypto

Methods

smpEncode :: SignedObject a -> ByteString Source #

smpDecode :: ByteString -> Either String (SignedObject a) Source #

smpP :: Parser (SignedObject a) Source #

AlgorithmI a => Encoding (AE2ERatchetParams a) Source # 
Instance details

Defined in Simplex.Messaging.Crypto.Ratchet

Methods

smpEncode :: AE2ERatchetParams a -> ByteString Source #

smpDecode :: ByteString -> Either String (AE2ERatchetParams a) Source #

smpP :: Parser (AE2ERatchetParams a) Source #

RatchetKEMStateI s => Encoding (RKEMParams s) Source # 
Instance details

Defined in Simplex.Messaging.Crypto.Ratchet

Methods

smpEncode :: RKEMParams s -> ByteString Source #

smpDecode :: ByteString -> Either String (RKEMParams s) Source #

smpP :: Parser (RKEMParams s) Source #

NtfEntityI e => Encoding (NewNtfEntity e) Source # 
Instance details

Defined in Simplex.Messaging.Notifications.Protocol

Methods

smpEncode :: NewNtfEntity e -> ByteString Source #

smpDecode :: ByteString -> Either String (NewNtfEntity e) Source #

smpP :: Parser (NewNtfEntity e) Source #

NtfEntityI e => Encoding (NtfCommandTag e) Source # 
Instance details

Defined in Simplex.Messaging.Notifications.Protocol

Methods

smpEncode :: NtfCommandTag e -> ByteString Source #

smpDecode :: ByteString -> Either String (NtfCommandTag e) Source #

smpP :: Parser (NtfCommandTag e) Source #

PartyI p => Encoding (CommandTag p) Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: CommandTag p -> ByteString Source #

smpDecode :: ByteString -> Either String (CommandTag p) Source #

smpP :: Parser (CommandTag p) Source #

ProtocolTypeI p => Encoding (ProtocolServer p) Source # 
Instance details

Defined in Simplex.Messaging.Protocol

Methods

smpEncode :: ProtocolServer p -> ByteString Source #

smpDecode :: ByteString -> Either String (ProtocolServer p) Source #

smpP :: Parser (ProtocolServer p) Source #

VersionScope v => Encoding (VersionRange v) Source # 
Instance details

Defined in Simplex.Messaging.Version

Methods

smpEncode :: VersionRange v -> ByteString Source #

smpDecode :: ByteString -> Either String (VersionRange v) Source #

smpP :: Parser (VersionRange v) Source #

Encoding (Version v) Source # 
Instance details

Defined in Simplex.Messaging.Version.Internal

Methods

smpEncode :: Version v -> ByteString Source #

smpDecode :: ByteString -> Either String (Version v) Source #

smpP :: Parser (Version v) Source #

Encoding a => Encoding (Maybe a) Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: Maybe a -> ByteString Source #

smpDecode :: ByteString -> Either String (Maybe a) Source #

smpP :: Parser (Maybe a) Source #

(RatchetKEMStateI s, AlgorithmI a) => Encoding (E2ERatchetParams s a) Source # 
Instance details

Defined in Simplex.Messaging.Crypto.Ratchet

Methods

smpEncode :: E2ERatchetParams s a -> ByteString Source #

smpDecode :: ByteString -> Either String (E2ERatchetParams s a) Source #

smpP :: Parser (E2ERatchetParams s a) Source #

(RatchetKEMStateI s, AlgorithmI a) => Encoding (E2ERatchetParamsUri s a) Source # 
Instance details

Defined in Simplex.Messaging.Crypto.Ratchet

Methods

smpEncode :: E2ERatchetParamsUri s a -> ByteString Source #

smpDecode :: ByteString -> Either String (E2ERatchetParamsUri s a) Source #

smpP :: Parser (E2ERatchetParamsUri s a) Source #

Encoding (MsgEncryptKey a) Source # 
Instance details

Defined in Simplex.Messaging.Crypto.Ratchet

Methods

smpEncode :: MsgEncryptKey a -> ByteString Source #

smpDecode :: ByteString -> Either String (MsgEncryptKey a) Source #

smpP :: Parser (MsgEncryptKey a) Source #

(Encoding a, Encoding b) => Encoding (a, b) Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: (a, b) -> ByteString Source #

smpDecode :: ByteString -> Either String (a, b) Source #

smpP :: Parser (a, b) Source #

(Encoding a, Encoding b, Encoding c) => Encoding (a, b, c) Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: (a, b, c) -> ByteString Source #

smpDecode :: ByteString -> Either String (a, b, c) Source #

smpP :: Parser (a, b, c) Source #

(Encoding a, Encoding b, Encoding c, Encoding d) => Encoding (a, b, c, d) Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: (a, b, c, d) -> ByteString Source #

smpDecode :: ByteString -> Either String (a, b, c, d) Source #

smpP :: Parser (a, b, c, d) Source #

(Encoding a, Encoding b, Encoding c, Encoding d, Encoding e) => Encoding (a, b, c, d, e) Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: (a, b, c, d, e) -> ByteString Source #

smpDecode :: ByteString -> Either String (a, b, c, d, e) Source #

smpP :: Parser (a, b, c, d, e) Source #

(Encoding a, Encoding b, Encoding c, Encoding d, Encoding e, Encoding f) => Encoding (a, b, c, d, e, f) Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: (a, b, c, d, e, f) -> ByteString Source #

smpDecode :: ByteString -> Either String (a, b, c, d, e, f) Source #

smpP :: Parser (a, b, c, d, e, f) Source #

(Encoding a, Encoding b, Encoding c, Encoding d, Encoding e, Encoding f, Encoding g) => Encoding (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: (a, b, c, d, e, f, g) -> ByteString Source #

smpDecode :: ByteString -> Either String (a, b, c, d, e, f, g) Source #

smpP :: Parser (a, b, c, d, e, f, g) Source #

(Encoding a, Encoding b, Encoding c, Encoding d, Encoding e, Encoding f, Encoding g, Encoding h) => Encoding (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: (a, b, c, d, e, f, g, h) -> ByteString Source #

smpDecode :: ByteString -> Either String (a, b, c, d, e, f, g, h) Source #

smpP :: Parser (a, b, c, d, e, f, g, h) Source #

newtype Tail Source #

Constructors

Tail 

Fields

Instances

Instances details
Encoding Tail Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: Tail -> ByteString Source #

smpDecode :: ByteString -> Either String Tail Source #

smpP :: Parser Tail Source #

newtype Large Source #

Constructors

Large 

Fields

Instances

Instances details
Encoding Large Source # 
Instance details

Defined in Simplex.Messaging.Encoding

Methods

smpEncode :: Large -> ByteString Source #

smpDecode :: ByteString -> Either String Large Source #

smpP :: Parser Large Source #

_smpP :: Encoding a => Parser a Source #

smpEncodeList :: Encoding a => [a] -> ByteString Source #

smpListP :: Encoding a => Parser [a] Source #

lenEncode :: Int -> Char Source #