Feat/did manager add/remove key/service sign only and submit from other controller agent (#5) #1378
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).