From 2f13c00dcdf064491dd9c2c5b7aa344b79a0207a Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 4 Jun 2024 17:53:48 +0200 Subject: [PATCH] fix signs did web --- pyvckit/sign_vc.py | 2 +- pyvckit/sign_vp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyvckit/sign_vc.py b/pyvckit/sign_vc.py index 2516f30..2420e88 100644 --- a/pyvckit/sign_vc.py +++ b/pyvckit/sign_vc.py @@ -10,7 +10,7 @@ from pyvckit.sign import sign_proof def sign(credential, key, issuer_did): document = json.loads(credential) - _did = issuer_did + "#" + issuer_did.split("did:key:")[1] + _did = issuer_did + "#" + issuer_did.split(":")[-1] proof = json.loads(proof_tmpl) proof['verificationMethod'] = _did proof['created'] = now() diff --git a/pyvckit/sign_vp.py b/pyvckit/sign_vp.py index d26e5fa..eed0661 100644 --- a/pyvckit/sign_vp.py +++ b/pyvckit/sign_vp.py @@ -12,7 +12,7 @@ def sign_vp(signing_key, holder_did, vc): presentation["verifiableCredential"].append(json.loads(vc)) presentation["holder"] = holder_did - _did = holder_did + "#" + holder_did.split("did:key:")[1] + _did = holder_did + "#" + holder_did.split(":")[-1] proof = json.loads(proof_tmpl) proof['verificationMethod'] = _did proof['created'] = now()