Copyright | © Clément Delafargue 2021 |
---|---|
License | MIT |
Maintainer | clement@delafargue.name |
Safe Haskell | None |
Language | Haskell2010 |
Conversion functions between biscuit components and protobuf-encoded components
Synopsis
- data Symbols
- buildSymbolTable :: Symbols -> Block -> BlockSymbols
- pbToBlock :: Maybe PublicKey -> Block -> StateT Symbols (Either String) Block
- blockToPb :: Bool -> Symbols -> Block -> (BlockSymbols, Block)
- pbToSignedBlock :: SignedBlock -> Either String SignedBlock
- signedBlockToPb :: SignedBlock -> SignedBlock
- pbToProof :: Proof -> Either String (Either Signature SecretKey)
- pbToThirdPartyBlockRequest :: ThirdPartyBlockRequest -> Either String PublicKey
- thirdPartyBlockRequestToPb :: PublicKey -> ThirdPartyBlockRequest
- pbToThirdPartyBlockContents :: ThirdPartyBlockContents -> Either String (ByteString, Signature, PublicKey)
- thirdPartyBlockContentsToPb :: (ByteString, Signature, PublicKey) -> ThirdPartyBlockContents
Documentation
buildSymbolTable :: Symbols -> Block -> BlockSymbols Source #
blockToPb :: Bool -> Symbols -> Block -> (BlockSymbols, Block) Source #
Turn a biscuit block into a protobuf block, for serialization, along with the newly defined symbols
pbToSignedBlock :: SignedBlock -> Either String SignedBlock Source #
Parse a protobuf signed block into a signed biscuit block