Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Msg msg = Msg {}
- class HasMessageType msg where
- messageType :: Proxy msg -> Text
- data TypedMessage = TypedMessage {
- typedMsgData :: ByteString
- typedMsgType :: Text
- data MessageParseError
- = WireTypeError Text
- | BinaryError Text
- | EmbeddedError Text (Maybe MessageParseError)
- | OtherParseError Text
- formatMessageParseError :: MessageParseError -> Text
- coerceProto3Error :: ParseError -> MessageParseError
- coerceProtoLensError :: String -> MessageParseError
- data MessageSemanticError
- = PermissionError Text
- | InvalidFieldError Text
- | OtherSemanticError Text
- formatMessageSemanticError :: MessageSemanticError -> Text
- class ValidateMessage msg where
- validateMessage :: Msg msg -> Validation [MessageSemanticError] ()
- nonEmptyCheck :: Eq a => Monoid a => Text -> a -> Validation [MessageSemanticError] ()
- isAuthorCheck :: Text -> Msg msg -> (msg -> Address) -> Validation [MessageSemanticError] ()
Documentation
The basic message format embedded in any transaction.
class HasMessageType msg where Source #
messageType :: Proxy msg -> Text Source #
data TypedMessage Source #
TypedMessage | |
|
Instances
Wrapped TypedMessage Source # | |
Defined in Tendermint.SDK.Types.Message type Unwrapped TypedMessage :: Type _Wrapped' :: Iso' TypedMessage (Unwrapped TypedMessage) | |
HasCodec TypedMessage Source # | |
Defined in Tendermint.SDK.Types.Message encode :: TypedMessage -> ByteString Source # decode :: ByteString -> Either Text TypedMessage Source # | |
type Unwrapped TypedMessage Source # | |
Defined in Tendermint.SDK.Types.Message |
data MessageParseError Source #
This is a general error type, primarily accomodating protobuf messages being parsed | by either the proto3-wire | or the proto-lens libraries.
WireTypeError Text | A |
BinaryError Text | A |
EmbeddedError Text (Maybe MessageParseError) | An |
OtherParseError Text | Unknown or unstructured parsing error. |
formatMessageParseError :: MessageParseError -> Text Source #
Useful for returning in error logs or console logging.
coerceProto3Error :: ParseError -> MessageParseError Source #
data MessageSemanticError Source #
Used during message validation to indicate that although the message has parsed | correctly, it fails certain sanity checks.
PermissionError Text | Used to indicate that the message signer does not have the authority to send | this message. |
InvalidFieldError Text | Used to indicate that a field isn't valid, e.g. enforces non-negative quantities | or nonempty lists. |
OtherSemanticError Text |
formatMessageSemanticError :: MessageSemanticError -> Text Source #
class ValidateMessage msg where Source #
validateMessage :: Msg msg -> Validation [MessageSemanticError] () Source #
nonEmptyCheck :: Eq a => Monoid a => Text -> a -> Validation [MessageSemanticError] () Source #
isAuthorCheck :: Text -> Msg msg -> (msg -> Address) -> Validation [MessageSemanticError] () Source #