gini-core-0.1.0.0

Safe HaskellNone
LanguageHaskell2010

Gini.Core.Protocol.Types.Message.Internal

Description

UDP Messages

Synopsis

Documentation

data Message #

Instances
Eq Message # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

(==) :: Message -> Message -> Bool #

(/=) :: Message -> Message -> Bool #

Show Message # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic Message # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep Message :: * -> * #

Methods

from :: Message -> Rep Message x #

to :: Rep Message x -> Message #

Display Message # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

display :: Message -> Utf8Builder

textDisplay :: Message -> Text

Validity Message # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: Message -> Validation

Persist Message # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

put :: Message -> Put ()

get :: Get Message

type Rep Message # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep Message = D1 (MetaData "Message" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" False) (C1 (MetaCons "Message" PrefixI True) ((S1 (MetaSel (Just "messageNetworkId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 NetworkId) :*: S1 (MetaSel (Just "messageVersionMax") SourceUnpack SourceStrict DecidedStrict) (Rec0 Word8)) :*: (S1 (MetaSel (Just "messageVersionUsing") SourceUnpack SourceStrict DecidedStrict) (Rec0 Word8) :*: (S1 (MetaSel (Just "messageVersionMin") SourceUnpack SourceStrict DecidedStrict) (Rec0 Word8) :*: S1 (MetaSel (Just "messageBody") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 MessageBody)))))

data MessageBody #

Message body whose content depends on block type in the header.

Constructors

MessageBodyKeepAlive !KeepAliveMessage

A list of 8 peers, some of which may be all-zero.

MessageBodyPublish !SignedBlock

Publish the given block

MessageBodyConfirmReq !ConfirmReqMessage

Requests confirmation of the given block or list of root/hash pairs

MessageBodyConfirmAck !ConfirmAckMessage

Signed confirmation of a block or a list of block hashes

MessageBodyBulkPull !BulkPullMessage

Bulk pull request.

MessageBodyBulkPush !BulkPushMessage

A bulk push is equivalent to an unsolicited bulk pull response. If a node knows about an account a peer doesn't, the node sends its local blocks for that account to the peer. The stream of blocks ends with a sentinel block of type enum_blocktype::not_a_block.

MessageBodyFrontierReq !FrontierReqMessage

Request frontiers (account chain head blocks) from a remote node

MessageBodyBulkPullBlocks

Deprecated. The server will respond with a single enum_blocktype::not_a_block byte.

MessageBodyNodeIdHandshake !NodeIdHandshakeMessage

A node ID handshake request and/or response.

MessageBodyBulkPullAccount !BulkPullAccountMessage

Bulk pull account request

Instances
Eq MessageBody # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show MessageBody # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic MessageBody # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep MessageBody :: * -> * #

Display MessageBody # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

display :: MessageBody -> Utf8Builder

textDisplay :: MessageBody -> Text

Validity MessageBody # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: MessageBody -> Validation

type Rep MessageBody # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep MessageBody = D1 (MetaData "MessageBody" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" False) (((C1 (MetaCons "MessageBodyKeepAlive" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 KeepAliveMessage)) :+: C1 (MetaCons "MessageBodyPublish" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 SignedBlock))) :+: (C1 (MetaCons "MessageBodyConfirmReq" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ConfirmReqMessage)) :+: (C1 (MetaCons "MessageBodyConfirmAck" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ConfirmAckMessage)) :+: C1 (MetaCons "MessageBodyBulkPull" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 BulkPullMessage))))) :+: ((C1 (MetaCons "MessageBodyBulkPush" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 BulkPushMessage)) :+: C1 (MetaCons "MessageBodyFrontierReq" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 FrontierReqMessage))) :+: (C1 (MetaCons "MessageBodyBulkPullBlocks" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "MessageBodyNodeIdHandshake" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 NodeIdHandshakeMessage)) :+: C1 (MetaCons "MessageBodyBulkPullAccount" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 BulkPullAccountMessage))))))

data NetworkId #

Network ID A, B or C for test, beta or live network respectively

Constructors

NetworkIdTest

Network ID A

NetworkIdBeta

Network ID B

NetworkIdLive

Network ID C

Instances
Bounded NetworkId # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Enum NetworkId # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Eq NetworkId # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show NetworkId # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic NetworkId # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep NetworkId :: * -> * #

Validity NetworkId # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: NetworkId -> Validation

Persist NetworkId # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

put :: NetworkId -> Put ()

get :: Get NetworkId

type Rep NetworkId # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep NetworkId = D1 (MetaData "NetworkId" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" False) (C1 (MetaCons "NetworkIdTest" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "NetworkIdBeta" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "NetworkIdLive" PrefixI False) (U1 :: * -> *)))

data MessageType #

Instances
Bounded MessageType # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Enum MessageType # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Eq MessageType # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show MessageType # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic MessageType # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep MessageType :: * -> * #

Validity MessageType # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: MessageType -> Validation

Persist MessageType # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

put :: MessageType -> Put ()

get :: Get MessageType

type Rep MessageType # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep MessageType = D1 (MetaData "MessageType" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" False) (((C1 (MetaCons "MessageTypeInvalid" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "MessageTypeNotAType" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MessageTypeKeepAlive" PrefixI False) (U1 :: * -> *))) :+: (C1 (MetaCons "MessageTypePublish" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "MessageTypeConfirmReq" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MessageTypeConfirmAck" PrefixI False) (U1 :: * -> *)))) :+: ((C1 (MetaCons "MessageTypeBulkPull" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "MessageTypeBulkPush" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MessageTypeFrontierReq" PrefixI False) (U1 :: * -> *))) :+: (C1 (MetaCons "MessageTypeBulkPullBlocks" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "MessageTypeNodeIdHandshake" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MessageTypeBulkPullAccount" PrefixI False) (U1 :: * -> *)))))

newtype Extensions #

Constructors

Extensions Word16 
Instances
Eq Extensions # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show Extensions # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic Extensions # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep Extensions :: * -> * #

Persist Extensions # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

put :: Extensions -> Put ()

get :: Get Extensions

type Rep Extensions # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep Extensions = D1 (MetaData "Extensions" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" True) (C1 (MetaCons "Extensions" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word16)))

newtype KeepAliveMessage #

A list of 8 peers, some of which may be all-zero.

Constructors

KeepAliveMessage 

Fields

Instances
Eq KeepAliveMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show KeepAliveMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic KeepAliveMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep KeepAliveMessage :: * -> * #

Validity KeepAliveMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: KeepAliveMessage -> Validation

Persist KeepAliveMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

put :: KeepAliveMessage -> Put ()

get :: Get KeepAliveMessage

type Rep KeepAliveMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep KeepAliveMessage = D1 (MetaData "KeepAliveMessage" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" True) (C1 (MetaCons "KeepAliveMessage" PrefixI True) (S1 (MetaSel (Just "_keepAliveMessagePeers") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Peer])))

keepAliveMessagePeers :: KeepAliveMessage -> [Peer] #

Access peers in keepalive message.

mkKeepAliveMessage :: [Peer] -> Either String KeepAliveMessage #

Construct a valid KeepAliveMessage (or return Left if invalid).

newtype Peer #

A peer entry in the keepalive message

Constructors

Peer 

Fields

Instances
Eq Peer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

(==) :: Peer -> Peer -> Bool #

(/=) :: Peer -> Peer -> Bool #

Ord Peer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

compare :: Peer -> Peer -> Ordering #

(<) :: Peer -> Peer -> Bool #

(<=) :: Peer -> Peer -> Bool #

(>) :: Peer -> Peer -> Bool #

(>=) :: Peer -> Peer -> Bool #

max :: Peer -> Peer -> Peer #

min :: Peer -> Peer -> Peer #

Show Peer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

showsPrec :: Int -> Peer -> ShowS #

show :: Peer -> String #

showList :: [Peer] -> ShowS #

Generic Peer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep Peer :: * -> * #

Methods

from :: Peer -> Rep Peer x #

to :: Rep Peer x -> Peer #

Display Peer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

display :: Peer -> Utf8Builder

textDisplay :: Peer -> Text

Validity Peer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: Peer -> Validation

Persist Peer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

put :: Peer -> Put ()

get :: Get Peer

PersistField Peer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

toPersistValue :: Peer -> PersistValue

fromPersistValue :: PersistValue -> Either Text Peer

PersistFieldSql Peer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

sqlType :: Proxy Peer -> SqlType

type Rep Peer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep Peer = D1 (MetaData "Peer" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" True) (C1 (MetaCons "Peer" PrefixI True) (S1 (MetaSel (Just "unPeer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 RawPeer)))

mkPeer :: HostAddress6 -> PortNumber -> Either String Peer #

Make a valid peer. The host and port must be non-zero.

peerHost :: Peer -> HostAddress6 #

ipv6 address, or ipv6-mapped ipv4 address.

data RawPeer #

An unvalidated peer entry in the keepalive message

Constructors

RawPeer 

Fields

Instances
Eq RawPeer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

(==) :: RawPeer -> RawPeer -> Bool #

(/=) :: RawPeer -> RawPeer -> Bool #

Ord RawPeer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show RawPeer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic RawPeer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep RawPeer :: * -> * #

Methods

from :: RawPeer -> Rep RawPeer x #

to :: Rep RawPeer x -> RawPeer #

Display RawPeer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

display :: RawPeer -> Utf8Builder

textDisplay :: RawPeer -> Text

Validity RawPeer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: RawPeer -> Validation

Persist RawPeer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

put :: RawPeer -> Put ()

get :: Get RawPeer

type Rep RawPeer # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep RawPeer = D1 (MetaData "RawPeer" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" False) (C1 (MetaCons "RawPeer" PrefixI True) (S1 (MetaSel (Just "rawPeerHost") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 HostAddress6) :*: S1 (MetaSel (Just "rawPeerPort") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 PortNumber)))

data ConfirmReqMessage #

Requests confirmation of the given block or list of root/hash pairs

Constructors

ConfirmReqMessageByHash !BlockHashPairs

If _root.header.block_type == enum_blocktype::not_a_block

ConfirmReqMessageBlock !SignedBlock

If _root.header.block_type != enum_blocktype::not_a_block

newtype BlockHashPairs #

A sequence of hash,root pairs

Constructors

BlockHashPairs 

Fields

Instances
Eq BlockHashPairs # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show BlockHashPairs # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic BlockHashPairs # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep BlockHashPairs :: * -> * #

Validity BlockHashPairs # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: BlockHashPairs -> Validation

Persist BlockHashPairs # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

put :: BlockHashPairs -> Put ()

get :: Get BlockHashPairs

type Rep BlockHashPairs # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep BlockHashPairs = D1 (MetaData "BlockHashPairs" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" True) (C1 (MetaCons "BlockHashPairs" PrefixI True) (S1 (MetaSel (Just "unBlockHashPairs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(BlockHash, BlockHash)])))

data ConfirmAckMessage #

Signed confirmation of a block or a list of block hashes

Instances
Eq ConfirmAckMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show ConfirmAckMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic ConfirmAckMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep ConfirmAckMessage :: * -> * #

Validity ConfirmAckMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: ConfirmAckMessage -> Validation

type Rep ConfirmAckMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep ConfirmAckMessage = D1 (MetaData "ConfirmAckMessage" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" False) (C1 (MetaCons "ConfirmAckMessage" PrefixI True) ((S1 (MetaSel (Just "confirmAckMessageAccount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Account) :*: S1 (MetaSel (Just "confirmAckMessageSignature") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Signature)) :*: (S1 (MetaSel (Just "confirmAckMessageSequence") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Word64) :*: S1 (MetaSel (Just "confirmAckMessageVoteBy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ConfirmAckVoteBy))))

data ConfirmAckVoteBy #

Constructors

ConfirmAckVoteByHashes !VoteByHashes

If _root.header.block_type == enum_blocktype::not_a_block

ConfirmAckVoteByBlock !SignedBlock

If _root.header.block_type != enum_blocktype::not_a_block

Instances
Eq ConfirmAckVoteBy # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show ConfirmAckVoteBy # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic ConfirmAckVoteBy # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep ConfirmAckVoteBy :: * -> * #

Validity ConfirmAckVoteBy # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: ConfirmAckVoteBy -> Validation

type Rep ConfirmAckVoteBy # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep ConfirmAckVoteBy = D1 (MetaData "ConfirmAckVoteBy" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" False) (C1 (MetaCons "ConfirmAckVoteByHashes" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 VoteByHashes)) :+: C1 (MetaCons "ConfirmAckVoteByBlock" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 SignedBlock)))

newtype VoteByHashes #

A sequence of up to 12 hashes, terminated by EOF.

Constructors

VoteByHashes 
Instances
Eq VoteByHashes # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show VoteByHashes # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic VoteByHashes # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep VoteByHashes :: * -> * #

Validity VoteByHashes # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: VoteByHashes -> Validation

Persist VoteByHashes # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

put :: VoteByHashes -> Put ()

get :: Get VoteByHashes

type Rep VoteByHashes # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep VoteByHashes = D1 (MetaData "VoteByHashes" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" True) (C1 (MetaCons "VoteByHashes" PrefixI True) (S1 (MetaSel (Just "unVoteByHashes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [BlockHash])))

mkVoteByHashes :: [BlockHash] -> Either String VoteByHashes #

Construct a valid VoteByHashes (or return Left if invalid)

data BulkPullMessage #

Bulk pull request

Constructors

BulkPullMessage 

Fields

Instances
Eq BulkPullMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show BulkPullMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic BulkPullMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep BulkPullMessage :: * -> * #

Validity BulkPullMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: BulkPullMessage -> Validation

type Rep BulkPullMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep BulkPullMessage = D1 (MetaData "BulkPullMessage" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" False) (C1 (MetaCons "BulkPullMessage" PrefixI True) (S1 (MetaSel (Just "bulkPullMessageStart") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 BlockHashOrAccount) :*: (S1 (MetaSel (Just "bulkPullMessageEnd") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 BlockHash) :*: S1 (MetaSel (Just "bulkPullMessageCount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Word32)))))

newtype BulkPushMessage #

A bulk push is equivalent to an unsolicited bulk pull response. | If a node knows about an account a peer doesn't, the node sends | its local blocks for that account to the peer. The stream of | blocks ends with a sentinel block of type BlockTypeNotABlock.

Instances
Eq BulkPushMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show BulkPushMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic BulkPushMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep BulkPushMessage :: * -> * #

Validity BulkPushMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: BulkPushMessage -> Validation

Persist BulkPushMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

put :: BulkPushMessage -> Put ()

get :: Get BulkPushMessage

type Rep BulkPushMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep BulkPushMessage = D1 (MetaData "BulkPushMessage" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" True) (C1 (MetaCons "BulkPushMessage" PrefixI True) (S1 (MetaSel (Just "bulkPushMessageEntries") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [SignedBlock])))

data FrontierReqMessage #

Request frontiers (account chain head blocks) from a remote node

Instances
Eq FrontierReqMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show FrontierReqMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic FrontierReqMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep FrontierReqMessage :: * -> * #

Validity FrontierReqMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: FrontierReqMessage -> Validation

Persist FrontierReqMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

put :: FrontierReqMessage -> Put ()

get :: Get FrontierReqMessage

type Rep FrontierReqMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep FrontierReqMessage = D1 (MetaData "FrontierReqMessage" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" False) (C1 (MetaCons "FrontierReqMessage" PrefixI True) (S1 (MetaSel (Just "frontierReqMessageStart") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Account) :*: (S1 (MetaSel (Just "frontierReqMessageAge") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Word32)) :*: S1 (MetaSel (Just "frontierReqMessageCount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Word32)))))

data NodeIdHandshakeMessage #

A node ID handshake request and/or response.

Instances
Eq NodeIdHandshakeMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show NodeIdHandshakeMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic NodeIdHandshakeMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep NodeIdHandshakeMessage :: * -> * #

Validity NodeIdHandshakeMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: NodeIdHandshakeMessage -> Validation

type Rep NodeIdHandshakeMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep NodeIdHandshakeMessage = D1 (MetaData "NodeIdHandshakeMessage" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" False) (C1 (MetaCons "NodeIdHandshakeMessage" PrefixI True) (S1 (MetaSel (Just "nodeIdHandshakeMessageQueryCookie") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Cookie)) :*: S1 (MetaSel (Just "nodeIdHandshakeMessageResponse") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe NodeIdHandshakeResponse))))

newtype Cookie #

Per-endpoint random number

Constructors

Cookie 
Instances
Eq Cookie # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

(==) :: Cookie -> Cookie -> Bool #

(/=) :: Cookie -> Cookie -> Bool #

Show Cookie # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

IsString Cookie # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

fromString :: String -> Cookie #

Generic Cookie # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep Cookie :: * -> * #

Methods

from :: Cookie -> Rep Cookie x #

to :: Rep Cookie x -> Cookie #

Display Cookie # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

display :: Cookie -> Utf8Builder

textDisplay :: Cookie -> Text

Validity Cookie # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: Cookie -> Validation

Persist Cookie # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

put :: Cookie -> Put ()

get :: Get Cookie

PersistField Cookie # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

toPersistValue :: Cookie -> PersistValue

fromPersistValue :: PersistValue -> Either Text Cookie

PersistFieldSql Cookie # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

sqlType :: Proxy Cookie -> SqlType

type Rep Cookie # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep Cookie = D1 (MetaData "Cookie" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" True) (C1 (MetaCons "Cookie" PrefixI True) (S1 (MetaSel (Just "unCookie") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Raw32ByteValue)))

cookieToByteString :: Cookie -> ByteString #

Extract bytestring from cookie

generateRandomCookie :: MonadRandom m => m Cookie #

Generate a cryptographically random cookie value

data NodeIdHandshakeResponse #

A node ID handshake response

Instances
Eq NodeIdHandshakeResponse # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show NodeIdHandshakeResponse # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic NodeIdHandshakeResponse # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep NodeIdHandshakeResponse :: * -> * #

Validity NodeIdHandshakeResponse # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: NodeIdHandshakeResponse -> Validation

Persist NodeIdHandshakeResponse # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep NodeIdHandshakeResponse # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep NodeIdHandshakeResponse = D1 (MetaData "NodeIdHandshakeResponse" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" False) (C1 (MetaCons "NodeIdHandshakeResponse" PrefixI True) (S1 (MetaSel (Just "nodeIdHandshakeResponseAccount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Account) :*: S1 (MetaSel (Just "nodeIdHandshakeResponseSignature") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Signature)))

data BulkPullAccountMessage #

Bulk pull account request

Instances
Eq BulkPullAccountMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show BulkPullAccountMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic BulkPullAccountMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep BulkPullAccountMessage :: * -> * #

Validity BulkPullAccountMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: BulkPullAccountMessage -> Validation

Persist BulkPullAccountMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep BulkPullAccountMessage # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep BulkPullAccountMessage = D1 (MetaData "BulkPullAccountMessage" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" False) (C1 (MetaCons "BulkPullAccountMessage" PrefixI True) (S1 (MetaSel (Just "bulkPullAccountMessageAccount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Account) :*: (S1 (MetaSel (Just "bulkPullAccountMessageMinimumAmount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Amount) :*: S1 (MetaSel (Just "bulkPullAccountMessageFlags") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 BulkPullAccountFlags))))

data BulkPullAccountFlags #

Flags for pulp pull account request

Instances
Bounded BulkPullAccountFlags # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Enum BulkPullAccountFlags # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Eq BulkPullAccountFlags # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Show BulkPullAccountFlags # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Generic BulkPullAccountFlags # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Associated Types

type Rep BulkPullAccountFlags :: * -> * #

Validity BulkPullAccountFlags # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

Methods

validate :: BulkPullAccountFlags -> Validation

Persist BulkPullAccountFlags # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep BulkPullAccountFlags # 
Instance details

Defined in Gini.Core.Protocol.Types.Message.Internal

type Rep BulkPullAccountFlags = D1 (MetaData "BulkPullAccountFlags" "Gini.Core.Protocol.Types.Message.Internal" "gini-core-0.1.0.0-CYC9q60CJ5rDf5hHcbgY0V" False) (C1 (MetaCons "BulkPullAccountFlagsPendingHashAndAmount" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "BulkPullAccountFlagsPendingAddressOnly" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "BulkPullAccountFlagsPendingHashAmountAndAddress" PrefixI False) (U1 :: * -> *)))

getWhileJust :: Get (Maybe a) -> Get [a] #

Get elements until the provided monad returns Nothing or EOF

getMaxN :: Persist a => Int -> Get [a] #

getMaxN n: get up to n elements, or stop earlier on EOF