Allow signed addKey
/addService
return type for later submission by other agent
#1373
Labels
addKey
/addService
return type for later submission by other agent
#1373
Is your feature request related to a problem? Please describe.
We need to invoke the below methods (using
ethr-did-provider
) which result in writes to the network:didManagerAddKey
(specificallyX25519
andEd25519
key types); and,didManagerAddService
(e.g. did-comm endpoint).As these calls invoke
eth_sendTransaction
which are listed asBLOCKED_RPC_METHODS
within MetaMask Snaps (more information here) the calls to these methods fail (see bottom of issue for error example).Describe the solution you'd like
I am open to suggestions on how best to approach this issue. One approach would be to allow an option/flag that would not submit the transaction to the network, but rather return the prepared (signed) transaction for submission in another context (i.e. via a Veramo agent instantiated in the DApp invoking). The addKey method looks like the below (did-ethr):
The returned (prepared and signed but not submitted) return type would look something like the below:
Describe alternatives you've considered
The approach that I have outlined above would necessitate the implementation of a new function (e.g.
submitAddKey
) so I am keen to hear other approaches.Additional context
Any method that invokes the
eth_sendTransaction
is going to result in this issue with errors corresponding broadly to the below example:The text was updated successfully, but these errors were encountered: