morley-client-0.2.0: Client to interact with the Tezos blockchain
Safe HaskellSafe-Inferred
LanguageHaskell2010

Morley.Client.OnlyRPC

Description

An alternative implementation of morley-client that does not require tezos-client and has some limitations because of that (not all methods are implemented).

Synopsis

Documentation

mkMorleyOnlyRpcEnv :: [SecretKey] -> BaseUrl -> Word -> IO MorleyOnlyRpcEnv Source #

Construct MorleyOnlyRpcEnv.

  • Full MorleyClientConfig is not passed because we need just 2 things from it.
  • Log action is built the same way as for MorleyClientEnv.
  • All secret keys are passed as an argument.

newtype MorleyOnlyRpcM a Source #

Monad that implements HasTezosClient and HasTezosRpc classes and can be used for high-level actions as an alternative to MorleyClientM.

Instances

Instances details
MonadIO MorleyOnlyRpcM Source # 
Instance details

Defined in Morley.Client.OnlyRPC

Methods

liftIO :: IO a -> MorleyOnlyRpcM a #

Applicative MorleyOnlyRpcM Source # 
Instance details

Defined in Morley.Client.OnlyRPC

Functor MorleyOnlyRpcM Source # 
Instance details

Defined in Morley.Client.OnlyRPC

Methods

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

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

Monad MorleyOnlyRpcM Source # 
Instance details

Defined in Morley.Client.OnlyRPC

MonadCatch MorleyOnlyRpcM Source # 
Instance details

Defined in Morley.Client.OnlyRPC

Methods

catch :: Exception e => MorleyOnlyRpcM a -> (e -> MorleyOnlyRpcM a) -> MorleyOnlyRpcM a #

MonadMask MorleyOnlyRpcM Source # 
Instance details

Defined in Morley.Client.OnlyRPC

MonadThrow MorleyOnlyRpcM Source # 
Instance details

Defined in Morley.Client.OnlyRPC

Methods

throwM :: Exception e => e -> MorleyOnlyRpcM a #

HasTezosRpc MorleyOnlyRpcM Source # 
Instance details

Defined in Morley.Client.OnlyRPC

Methods

getBlockHash :: BlockId -> MorleyOnlyRpcM BlockHash Source #

getCounterAtBlock :: BlockId -> Address -> MorleyOnlyRpcM TezosInt64 Source #

getBlockHeader :: BlockId -> MorleyOnlyRpcM BlockHeader Source #

getScriptSizeAtBlock :: BlockId -> CalcSize -> MorleyOnlyRpcM ScriptSize Source #

getBlockConstants :: BlockId -> MorleyOnlyRpcM BlockConstants Source #

getBlockOperations :: BlockId -> MorleyOnlyRpcM [[BlockOperation]] Source #

getBlockOperationHashes :: BlockId -> MorleyOnlyRpcM [[OperationHash]] Source #

getProtocolParametersAtBlock :: BlockId -> MorleyOnlyRpcM ProtocolParameters Source #

runOperationAtBlock :: BlockId -> RunOperation -> MorleyOnlyRpcM RunOperationResult Source #

preApplyOperationsAtBlock :: BlockId -> [PreApplyOperation] -> MorleyOnlyRpcM [RunOperationResult] Source #

forgeOperationAtBlock :: BlockId -> ForgeOperation -> MorleyOnlyRpcM HexJSONByteString Source #

injectOperation :: HexJSONByteString -> MorleyOnlyRpcM OperationHash Source #

getContractScriptAtBlock :: BlockId -> Address -> MorleyOnlyRpcM OriginationScript Source #

getContractStorageAtBlock :: BlockId -> Address -> MorleyOnlyRpcM Expression Source #

getContractBigMapAtBlock :: BlockId -> Address -> GetBigMap -> MorleyOnlyRpcM GetBigMapResult Source #

getBigMapValueAtBlock :: BlockId -> Natural -> Text -> MorleyOnlyRpcM Expression Source #

getBigMapValuesAtBlock :: BlockId -> Natural -> Maybe Natural -> Maybe Natural -> MorleyOnlyRpcM Expression Source #

getBalanceAtBlock :: BlockId -> Address -> MorleyOnlyRpcM Mutez Source #

getDelegateAtBlock :: BlockId -> Address -> MorleyOnlyRpcM (Maybe KeyHash) Source #

runCodeAtBlock :: BlockId -> RunCode -> MorleyOnlyRpcM RunCodeResult Source #

getChainId :: MorleyOnlyRpcM ChainId Source #

getManagerKeyAtBlock :: BlockId -> Address -> MorleyOnlyRpcM (Maybe PublicKey) Source #

waitForOperation :: MorleyOnlyRpcM OperationHash -> MorleyOnlyRpcM OperationHash Source #

HasTezosClient MorleyOnlyRpcM Source # 
Instance details

Defined in Morley.Client.OnlyRPC

Methods

signBytes :: AddressOrAlias -> Maybe ScrubbedBytes -> ByteString -> MorleyOnlyRpcM Signature Source #

genKey :: Alias -> MorleyOnlyRpcM Address Source #

genFreshKey :: Alias -> MorleyOnlyRpcM Address Source #

revealKey :: Alias -> Maybe ScrubbedBytes -> MorleyOnlyRpcM () Source #

rememberContract :: Bool -> Address -> Alias -> MorleyOnlyRpcM () Source #

importKey :: Bool -> Alias -> SecretKey -> MorleyOnlyRpcM Alias Source #

resolveAddressMaybe :: AddressOrAlias -> MorleyOnlyRpcM (Maybe Address) Source #

getAlias :: AddressOrAlias -> MorleyOnlyRpcM Alias Source #

getPublicKey :: AddressOrAlias -> MorleyOnlyRpcM PublicKey Source #

getSecretKey :: AddressOrAlias -> MorleyOnlyRpcM SecretKey Source #

registerDelegate :: Alias -> Maybe ScrubbedBytes -> MorleyOnlyRpcM () Source #

getTezosClientConfig :: MorleyOnlyRpcM TezosClientConfig Source #

calcTransferFee :: AddressOrAlias -> Maybe ScrubbedBytes -> TezosInt64 -> [CalcTransferFeeData] -> MorleyOnlyRpcM [TezosMutez] Source #

calcOriginationFee :: forall (st :: T) (cp :: T). UntypedValScope st => CalcOriginationFeeData cp st -> MorleyOnlyRpcM TezosMutez Source #

getKeyPassword :: Address -> MorleyOnlyRpcM (Maybe ScrubbedBytes) Source #

RunClient MorleyOnlyRpcM Source # 
Instance details

Defined in Morley.Client.OnlyRPC

MonadUnliftIO MorleyOnlyRpcM Source # 
Instance details

Defined in Morley.Client.OnlyRPC

Methods

withRunInIO :: ((forall a. MorleyOnlyRpcM a -> IO a) -> IO b) -> MorleyOnlyRpcM b #

MonadReader MorleyOnlyRpcEnv MorleyOnlyRpcM Source # 
Instance details

Defined in Morley.Client.OnlyRPC

HasLog MorleyOnlyRpcEnv Message MorleyOnlyRpcM Source # 
Instance details

Defined in Morley.Client.OnlyRPC

runMorleyOnlyRpcM :: MorleyOnlyRpcEnv -> MorleyOnlyRpcM a -> IO a Source #

Run MorleyOnlyRpcM action within given MorleyOnlyRpcEnv. Retry action in case of invalid counter error.