Open ma2bd opened 6 months ago
Currently the wallet associates each chain with a unique optional key pair, and the ChainClient
is initialized with only that. ChainClient::rotate_key_pair
would add another entry to known_key_pairs
, but it isn't exposed via the CLI or node service, so each ChainClient
currently has at most one key pair.
We should decide:
ChainClient
have key pairs at all, or should it be passed in to all the functions?Currently the node service has one ChainClient
for each chain. If we make each ChainClient
have only one key pair, it may need to instantiate multiple ChainClient
s for each chain where we have multiple key pairs.
As discussed, it might be best to split ChainClient
into two parts: The ChainClient
itself will not have any key pairs, or methods that basically just put together an Operation
and pass it to the execute_*
functions.
An OwnedChainClient
(name TBD) will contain a ChainClient
and a key pair, and have these convenience methods.
The file
examples/fungible/README.md
ends with two URLs. If one opens them both, it is possible to transfer from the first account to the second one but not backward. This is likely because the "node service" wants to use the same (first) signing key for both actions.Incidentally, the error message in the UI is not great.