Skip to content

Commit 44be3c8

Browse files
TheTechmagedbluhm
authored andcommitted
fix: DIDCommV1: Routing keys & forward messages
Signed-off-by: Colton Wolkins (Laptop) <[email protected]>
1 parent c366a90 commit 44be3c8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

didcomm_messaging/v1/messaging.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ async def did_to_target(
8484
self.vm_to_v1_kid(crypto, doc, recip) for recip in target.recipient_keys
8585
]
8686
routing_keys = [
87-
self.vm_to_v1_kid(crypto, doc, routing_key)
87+
crypto.public_key_to_v1_kid(
88+
crypto.verification_method_to_public_key(
89+
VerificationMethod(id=routing_key, type="Ed25519VerificationKey2020", controller=routing_key.split("#")[0], public_key_multibase=routing_key.split("#")[1])
90+
)
91+
)
8892
for routing_key in target.routing_keys
8993
]
9094
endpoint = target.service_endpoint
@@ -187,7 +191,7 @@ async def pack(
187191
encoded_message = await packaging.pack(
188192
crypto,
189193
secrets,
190-
self.forward_wrap(forward_to, encoded_message.to_json()),
194+
self.forward_wrap(forward_to, encoded_message.serialize()),
191195
[routing_key],
192196
)
193197
forward_to = routing_key

0 commit comments

Comments
 (0)