Safe Haskell | None |
---|
Ripple.WebSockets
Contents
- receiveJSON :: (FromJSON j, MonadIO m) => Connection -> m (Either String j)
- sendJSON :: (ToJSON j, MonadIO m) => Connection -> j -> m ()
- data RippleError
- data RippleResult id a = RippleResult (Maybe id) (Either RippleError a)
- getRippleResult :: Either String (RippleResult () a) -> Either RippleError a
- getRippleResult' :: Either String (RippleResult id a) -> Either RippleError a
- data CommandRipplePathFind = CommandRipplePathFind {}
- data ResultRipplePathFind = ResultRipplePathFind {}
- data Alternative = Alternative {}
- data CommandAccountTX = CommandAccountTX {
- account :: RippleAddress
- limit :: Int
- offset :: Maybe Int
- ledgerIndexMin :: Maybe Integer
- ledgerIndexMax :: Maybe Integer
- descending :: Bool
- binary :: Bool
- data ResultAccountTX = ResultAccountTX [(Integer, Transaction)]
- data CommandLedger = CommandLedger {
- ledger_index :: Maybe Integer
- transactions :: Bool
- expand :: Bool
- data ResultLedger = ResultLedger {}
- data CommandLedgerClosed = CommandLedgerClosed
- data ResultLedgerClosed = ResultLedgerClosed ByteString Integer
Base WebSocket helpers
receiveJSON :: (FromJSON j, MonadIO m) => Connection -> m (Either String j)Source
sendJSON :: (ToJSON j, MonadIO m) => Connection -> j -> m ()Source
Ripple JSON result parsing and error handling
data RippleError Source
Ripple server error codes
Constructors
UnknownCommand | |
ResponseParseError String | |
OtherRippleError Int String String |
Instances
data RippleResult id a Source
The result of a WebSocket command -- either error or a response
Constructors
RippleResult (Maybe id) (Either RippleError a) |
Instances
(Eq id, Eq a) => Eq (RippleResult id a) | |
(Show id, Show a) => Show (RippleResult id a) | |
(FromJSON a, FromJSON id) => FromJSON (RippleResult id a) |
getRippleResult :: Either String (RippleResult () a) -> Either RippleError aSource
getRippleResult' :: Either String (RippleResult id a) -> Either RippleError aSource
ripple_path_find
data CommandRipplePathFind Source
Constructors
CommandRipplePathFind | |
data ResultRipplePathFind Source
Constructors
ResultRipplePathFind | |
Fields |
account_tx
data CommandAccountTX Source
Constructors
CommandAccountTX | |
Fields
|
Instances
data ResultAccountTX Source
- (ledger_index, transaction+meta)
Constructors
ResultAccountTX [(Integer, Transaction)] |
ledger
data CommandLedger Source
Constructors
CommandLedger | |
Fields
|
Instances
ledger_closed
data CommandLedgerClosed Source
Constructors
CommandLedgerClosed |
data ResultLedgerClosed Source
Constructors
ResultLedgerClosed ByteString Integer |