hs-abci-sdk-0.1.0.0

Safe HaskellNone
LanguageHaskell2010

Tendermint.SDK.Types.Message

Synopsis

Documentation

data Msg msg Source #

The basic message format embedded in any transaction.

Constructors

Msg 

Fields

Instances
Functor Msg Source # 
Instance details

Defined in Tendermint.SDK.Types.Message

Methods

fmap :: (a -> b) -> Msg a -> Msg b #

(<$) :: a -> Msg b -> Msg a #

class HasMessageType msg where Source #

Methods

messageType :: Proxy msg -> Text Source #

data TypedMessage Source #

Constructors

TypedMessage 
Instances
Wrapped TypedMessage Source # 
Instance details

Defined in Tendermint.SDK.Types.Message

Associated Types

type Unwrapped TypedMessage :: Type

Methods

_Wrapped' :: Iso' TypedMessage (Unwrapped TypedMessage)

HasCodec TypedMessage Source # 
Instance details

Defined in Tendermint.SDK.Types.Message

type Unwrapped TypedMessage Source # 
Instance details

Defined in Tendermint.SDK.Types.Message

type Unwrapped TypedMessage = TypedMessage

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 WireTypeError occurs when the type of the data in the protobuf binary format does not match the type encountered by the parser.

BinaryError Text

A BinaryError occurs when we can't successfully parse the contents of the field.

EmbeddedError Text (Maybe MessageParseError)

An EmbeddedError occurs when we encounter an error while parsing an embedded message.

OtherParseError Text

Unknown or unstructured parsing error.

formatMessageParseError :: MessageParseError -> Text Source #

Useful for returning in error logs or console logging.

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 

nonEmptyCheck :: Eq a => Monoid a => Text -> a -> Validation [MessageSemanticError] () Source #

isAuthorCheck :: Text -> Msg msg -> (msg -> Address) -> Validation [MessageSemanticError] () Source #