Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Some read-only actions (wrappers over RPC calls).
Synopsis
- data ValueDecodeFailure = ValueDecodeFailure Text T
- data ValueNotFound = ValueNotFound
- readAllBigMapValues :: forall v k m. (NiceUnpackedValue v, HasTezosRpc m) => BigMapId k v -> m [v]
- readAllBigMapValuesMaybe :: forall v k m. (NiceUnpackedValue v, HasTezosRpc m) => BigMapId k v -> m (Maybe [v])
- readContractBigMapValue :: forall k v m. (PackedValScope k, HasTezosRpc m, SingI v) => ContractAddress -> Value k -> m (Value v)
- readBigMapValueMaybe :: forall v k m. (NicePackedValue k, NiceUnpackedValue v, HasTezosRpc m) => BigMapId k v -> k -> m (Maybe v)
- readBigMapValue :: forall v k m. (NicePackedValue k, NiceUnpackedValue v, HasTezosRpc m) => BigMapId k v -> k -> m v
- getContract :: HasTezosRpc m => ContractAddress -> m Contract
- getImplicitContractCounter :: HasTezosRpc m => ImplicitAddress -> m TezosInt64
- getContractsParameterTypes :: HasTezosRpc m => [ContractAddress] -> m TcOriginatedContracts
- getContractStorage :: HasTezosRpc m => ContractAddress -> m Expression
- getScriptSize :: HasTezosRpc m => CalcSize -> m ScriptSize
- getBigMapValue :: HasTezosRpc m => Natural -> Text -> m Expression
- getBigMapValues :: HasTezosRpc m => Natural -> Maybe Natural -> Maybe Natural -> m Expression
- getHeadBlock :: HasTezosRpc m => m BlockHash
- getCounter :: HasTezosRpc m => ImplicitAddress -> m TezosInt64
- getProtocolParameters :: HasTezosRpc m => m ProtocolParameters
- runOperation :: HasTezosRpc m => RunOperation -> m RunOperationResult
- preApplyOperations :: HasTezosRpc m => [PreApplyOperation] -> m [RunOperationResult]
- forgeOperation :: HasTezosRpc m => ForgeOperation -> m HexJSONByteString
- getContractScript :: HasTezosRpc m => ContractAddress -> m OriginationScript
- getContractBigMap :: HasTezosRpc m => ContractAddress -> GetBigMap -> m GetBigMapResult
- getBalance :: forall kind m. (HasTezosRpc m, L1AddressKind kind) => KindedAddress kind -> m Mutez
- getDelegate :: HasTezosRpc m => ContractAddress -> m (Maybe KeyHash)
- runCode :: HasTezosRpc m => RunCode -> m RunCodeResult
- getManagerKey :: HasTezosRpc m => ImplicitAddress -> m (Maybe PublicKey)
Documentation
data ValueDecodeFailure Source #
Failed to decode received value to the given type.
Instances
Exception ValueDecodeFailure Source # | |
Defined in Morley.Client.RPC.Getters | |
Show ValueDecodeFailure Source # | |
Defined in Morley.Client.RPC.Getters showsPrec :: Int -> ValueDecodeFailure -> ShowS # show :: ValueDecodeFailure -> String # showList :: [ValueDecodeFailure] -> ShowS # | |
Buildable ValueDecodeFailure Source # | |
Defined in Morley.Client.RPC.Getters build :: ValueDecodeFailure -> Builder # |
data ValueNotFound Source #
Instances
Exception ValueNotFound Source # | |
Defined in Morley.Client.RPC.Getters | |
Show ValueNotFound Source # | |
Defined in Morley.Client.RPC.Getters showsPrec :: Int -> ValueNotFound -> ShowS # show :: ValueNotFound -> String # showList :: [ValueNotFound] -> ShowS # | |
Buildable ValueNotFound Source # | |
Defined in Morley.Client.RPC.Getters build :: ValueNotFound -> Builder # |
readAllBigMapValues :: forall v k m. (NiceUnpackedValue v, HasTezosRpc m) => BigMapId k v -> m [v] Source #
Read all big_map values, given it's ID.
If the values are not of the expected type, a ValueDecodeFailure
will be thrown.
readAllBigMapValuesMaybe :: forall v k m. (NiceUnpackedValue v, HasTezosRpc m) => BigMapId k v -> m (Maybe [v]) Source #
Read all big_map values, given it's ID.
If the values are not of the expected type, a ValueDecodeFailure
will be thrown.
Returns Nothing
if a big_map with the given ID does not exist.
readContractBigMapValue :: forall k v m. (PackedValScope k, HasTezosRpc m, SingI v) => ContractAddress -> Value k -> m (Value v) Source #
Read big_map value of given contract by key.
If the contract contains several big_map
s with given key type, only one
of them will be considered.
readBigMapValueMaybe :: forall v k m. (NicePackedValue k, NiceUnpackedValue v, HasTezosRpc m) => BigMapId k v -> k -> m (Maybe v) Source #
Read big_map value, given it's ID and a key.
If the value is not of the expected type, a ValueDecodeFailure
will be thrown.
Returns Nothing
if a big_map with the given ID does not exist,
or it does exist but does not contain the given key.
readBigMapValue :: forall v k m. (NicePackedValue k, NiceUnpackedValue v, HasTezosRpc m) => BigMapId k v -> k -> m v Source #
Read big_map value, given it's ID and a key.
If the value is not of the expected type, a ValueDecodeFailure
will be thrown.
getContract :: HasTezosRpc m => ContractAddress -> m Contract Source #
Get originated Contract
for some address.
getImplicitContractCounter :: HasTezosRpc m => ImplicitAddress -> m TezosInt64 Source #
Get counter value for given implicit address.
getContractsParameterTypes :: HasTezosRpc m => [ContractAddress] -> m TcOriginatedContracts Source #
Extract parameter types for all smart contracts' addresses and return mapping from their hashes to their parameter types
getContractStorage :: HasTezosRpc m => ContractAddress -> m Expression Source #
getContractStorageAtBlock
applied to the head block.
getScriptSize :: HasTezosRpc m => CalcSize -> m ScriptSize Source #
getScriptSizeAtBlock
applied to the head block.
getBigMapValue :: HasTezosRpc m => Natural -> Text -> m Expression Source #
getBigMapValueAtBlock
applied to the head block.
getBigMapValues :: HasTezosRpc m => Natural -> Maybe Natural -> Maybe Natural -> m Expression Source #
getBigMapValuesAtBlock
applied to the head block.
getHeadBlock :: HasTezosRpc m => m BlockHash Source #
Get hash of the current head block, this head hash is used in other RPC calls.
getCounter :: HasTezosRpc m => ImplicitAddress -> m TezosInt64 Source #
getCounterAtBlock
applied to the head block.
getProtocolParameters :: HasTezosRpc m => m ProtocolParameters Source #
getProtocolParametersAtBlock
applied to the head block.
runOperation :: HasTezosRpc m => RunOperation -> m RunOperationResult Source #
runOperationAtBlock
applied to the head block.
preApplyOperations :: HasTezosRpc m => [PreApplyOperation] -> m [RunOperationResult] Source #
preApplyOperationsAtBlock
applied to the head block.
forgeOperation :: HasTezosRpc m => ForgeOperation -> m HexJSONByteString Source #
forgeOperationAtBlock
applied to the head block.
getContractScript :: HasTezosRpc m => ContractAddress -> m OriginationScript Source #
getContractScriptAtBlock
applied to the head block.
getContractBigMap :: HasTezosRpc m => ContractAddress -> GetBigMap -> m GetBigMapResult Source #
getContractBigMapAtBlock
applied to the head block.
getBalance :: forall kind m. (HasTezosRpc m, L1AddressKind kind) => KindedAddress kind -> m Mutez Source #
getBalanceAtBlock
applied to the head block.
getDelegate :: HasTezosRpc m => ContractAddress -> m (Maybe KeyHash) Source #
getDelegateAtBlock
applied to the head block.
runCode :: HasTezosRpc m => RunCode -> m RunCodeResult Source #
runCodeAtBlock
applied to the head block.
getManagerKey :: HasTezosRpc m => ImplicitAddress -> m (Maybe PublicKey) Source #