eths-rlp-0.1.0.0: Ethereum Recursive Length Prefix Encoding

Safe HaskellNone
LanguageHaskell2010

Blockchain.Ethereum.RLP

Synopsis

Documentation

rlpSerialize :: RLPObject -> ByteString Source #

Serialize RLPObject to ByteString

Examples: >>> rlpSerialize $ RLPItem B.empty "128" >>> rlpSerialize $ RLPList [] "192"

rlpDeserialize :: ByteString -> (Either String RLPObject, ByteString) Source #

Deserialize ByteString to RLPObject

Examples: >>> rlpDeserialize $ B.pack [128] (Right (RLPItem ""),"") >>> rlpDeserialize $ B.pack [192] (Right (RLPList []),"")