fix signs did web
This commit is contained in:
parent
fda78d7358
commit
2f13c00dcd
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue