fix signs did web

This commit is contained in:
Cayo Puigdefabregas 2024-06-04 17:53:48 +02:00
parent fda78d7358
commit 2f13c00dcd
2 changed files with 2 additions and 2 deletions

View File

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

View File

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