Closed MattiaDellOca closed 3 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Bug severity: 2
Describe the bug: I tried to create a local development environment for Veramo v5.1.2 using
did:ethr
. This was the configuration of my agent created following Veramo's guidelines:At this phase I was able to create/resolve DIDs in my local network.
However, when I tried adding an
X25519
key agreement (necessary for encrypting message when usingdid:ethr
), I ran into the following error:Error: missing provider (operation="sendTransaction", code=UNSUPPORTED_OPERATION, version=abstract-signer/5.7.0).
To Reproduce Steps to reproduce the behaviour:
EthereumDIDRegistry
in a Hardhat local network. You can find the necessary steps hereX25519
key agreement using this:Observed behaviour When trying to add an
X25519
key agreement you will run into an error complaining about a missing provider:Error: missing provider (operation="sendTransaction", code=UNSUPPORTED_OPERATION, version=abstract-signer/5.7.0).
Expected behaviour I would expect the key to be added correctly, as the configuration seems correct
Additional context @mirceanis helped me solving this issue. He suggested me to remove the
networks: [{<config>}]
properties and move the<config>
at the top level of the provider configuration. Here is my updated provider configuration:The key addition now works correctly. Note however that when configuring a provider,
[networks](networks: [{<config>}])
should be used instead of using the<config>
at the top level of the provider configuration, as described here: https://github.com/decentralized-identity/veramo/blob/ab16cbdad37266f0457251f34446624fbe2ed4c9/packages/did-provider-ethr/src/ethr-did-provider.ts#L56C1-L108C2.Following @mirceanis suggestion, I've opened this issue for tracking.
Versions: