| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Tendermint.SDK.Types.Message
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 #
Methods
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 Methods messageType :: Proxy TransferMsg -> Text Source # | |
data TypedMessage Source #
Constructors
| TypedMessage | |
Fields | |
Instances
| Wrapped TypedMessage Source # | |
Defined in Tendermint.SDK.Types.Message Associated Types type Unwrapped TypedMessage Methods _Wrapped' :: Iso' TypedMessage (Unwrapped TypedMessage) | |
| HasCodec TypedMessage Source # | |
Defined in Tendermint.SDK.Types.Message Methods 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.
Constructors
| 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.
Constructors
| 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 #
Methods
validateMessage :: Msg msg -> Validation [MessageSemanticError] () Source #
Instances
| ValidateMessage BurnMsg Source # | |
Defined in Tendermint.SDK.Modules.Bank.Messages Methods validateMessage :: Msg BurnMsg -> Validation [MessageSemanticError] () Source # | |
| ValidateMessage TransferMsg Source # | |
Defined in Tendermint.SDK.Modules.Bank.Messages Methods 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 #