Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Msg msg = Msg {}
- class HasMessageType msg where
- messageType :: Proxy msg -> Text
- data TypedMessage = TypedMessage {}
- data MessageParseError
- formatMessageParseError :: MessageParseError -> Text
- coerceProto3Error :: ParseError -> MessageParseError
- coerceProtoLensError :: String -> MessageParseError
- data MessageSemanticError
- 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 #
Instances
HasMessageType BurnMsg Source # | |
Defined in Tendermint.SDK.Modules.Bank.Messages | |
HasMessageType TransferMsg Source # | |
Defined in Tendermint.SDK.Modules.Bank.Messages messageType :: Proxy TransferMsg -> Text Source # |
data TypedMessage Source #
Instances
Wrapped TypedMessage Source # | |
Defined in Tendermint.SDK.Types.Message type Unwrapped TypedMessage _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 |
class ValidateMessage msg where Source #
validateMessage :: Msg msg -> Validation [MessageSemanticError] () Source #
Instances
ValidateMessage BurnMsg Source # | |
Defined in Tendermint.SDK.Modules.Bank.Messages validateMessage :: Msg BurnMsg -> Validation [MessageSemanticError] () Source # | |
ValidateMessage TransferMsg Source # | |
Defined in Tendermint.SDK.Modules.Bank.Messages validateMessage :: Msg TransferMsg -> Validation [MessageSemanticError] () Source # |
nonEmptyCheck :: Eq a => Monoid a => Text -> a -> Validation [MessageSemanticError] () Source #
isAuthorCheck :: Text -> Msg msg -> (msg -> Address) -> Validation [MessageSemanticError] () Source #