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()