From 1872e861d3295b713eeb02113e70ca373b97c892 Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Tue, 30 Jan 2024 22:37:45 -0500 Subject: [PATCH] fix: use Ed25519VerificationKey2020 instead of Multikey for now Signed-off-by: Daniel Bluhm --- aries_cloudagent/connections/base_manager.py | 21 ++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/aries_cloudagent/connections/base_manager.py b/aries_cloudagent/connections/base_manager.py index 0541dbcd89..7be91aea24 100644 --- a/aries_cloudagent/connections/base_manager.py +++ b/aries_cloudagent/connections/base_manager.py @@ -11,8 +11,6 @@ from base58 import b58decode from did_peer_2 import KeySpec, generate from did_peer_4 import encode, long_to_short -from did_peer_4.input_doc import KeySpec as KeySpec_DP4 -from did_peer_4.input_doc import input_doc_from_keys_and_services from pydid import ( BaseDIDDocument as ResolvedDocument, ) @@ -153,10 +151,21 @@ async def create_did_peer_4( async with self._profile.session() as session: wallet = session.inject(BaseWallet) key = await wallet.create_key(ED25519) - key_spec = KeySpec_DP4(multikey=self._key_info_to_multikey(key)) - input_doc = input_doc_from_keys_and_services( - keys=[key_spec], services=services - ) + input_doc = { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://w3id.org/security/suites/ed25519-2020/v1", + ], + "verificationMethod": [ + { + "id": "#key-0", + "type": "Ed25519VerificationKey2020", + "publicKeyMultibase": self._key_info_to_multikey(key), + } + ], + "authentication": ["#key-0"], + "service": services, + } did = encode(input_doc) did_info = DIDInfo(