Support tx submission without tezos-client
Description
Problem: all high-level actions in morley-client require tezos-client to be available. Not everyone has it in their system and it adds extra burden to install it. Sometimes it is preferrable to use only RPC.
Solution: tezos-client is not strictly required to submit transactions.
Transaction submission uses only a few methods from HasTezosClient and
can be implemented without launching the actual tezos-client.
To have a different implementation of HasTezosClient
we define
a new monad (MorleyOnlyRpcM
) which implements HasTezosRpc
the same
way as the existing MorleyClientM
, but implements HasTezosClient
differently. Signing happens in memory, other functions essentially do
nothing or throw exceptions.
Note: the first attempt to solve this problem was !725 (closed). I am using a different approach here because that one seemed a bit weird: there we combine 2 ways of passing actions: type classes and function arguments.
Also I've expanded the BlockOperation
type to include information that I need in one project.
Related issue(s)
None, I need it in another project.
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.