Due to constraints within the secure MetaMask Snap context, it is not possible to invoke the didManagerAdd(Remove)Service or didManagerAdd(Remove)Key methods on the did-manager successfully. Refer here for the list of blocked RPC methods.
As outlined in the referenced issue, the changes proposed herein allow for the transaction to be signed within one agent (in the demonstration case, by an agent in the constrained MetaMask Snap environment), and then submitted from another agent to the network in another context (in the demonstrated case this is a nodejs server, not subject to the constraints of the MetaMask Snap).
Quality
Check all that apply:
[x] I want these changes to be integrated
[x] I successfully ran pnpm i, pnpm build, pnpm test, pnpm test:browser locally.
[x] I allow my PR to be updated by the reviewers (to speed up the review process).
[ ] I added unit tests.
[ ] I added integration tests.
[x] I did not add automated tests because I first want to have the code reviewed by the maintainers, to get their feedback on the approach, and am happy to add tests as part of the final PR.
Details
I have successfully tested this (with the did-ethr-provider on the sepolia testnet). See resulting public DIDDoc below (with added ed25519 key and a mock service endpoint).
What issue is this PR fixing
Closes #1373
What is being changed
Due to constraints within the secure MetaMask Snap context, it is not possible to invoke the
didManagerAdd(Remove)Service
ordidManagerAdd(Remove)Key
methods on thedid-manager
successfully. Refer here for the list of blocked RPC methods.As outlined in the referenced issue, the changes proposed herein allow for the transaction to be signed within one agent (in the demonstration case, by an agent in the constrained MetaMask Snap environment), and then submitted from another agent to the network in another context (in the demonstrated case this is a nodejs server, not subject to the constraints of the MetaMask Snap).
Quality
Check all that apply:
pnpm i
,pnpm build
,pnpm test
,pnpm test:browser
locally.Details
I have successfully tested this (with the
did-ethr-provider
on thesepolia
testnet). See resulting public DIDDoc below (with addeded25519
key and a mock service endpoint).