From dfb80dd5cb4fbac641e6898aae4cabaa911133d3 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 31 May 2024 20:06:16 +0200 Subject: [PATCH] move files to package pyvckit --- did.py => pyvckit/did.py | 0 sign.py => pyvckit/sign.py | 0 sign_vc.py => pyvckit/sign_vc.py | 0 sign_vp.py => pyvckit/sign_vp.py | 0 pyvckit/templates.py | 67 ++++++++++++++++++++++++++++ utils.py => pyvckit/utils.py | 0 verify.py => pyvckit/verify.py | 0 verify_vc.py => pyvckit/verify_vc.py | 0 verify_vp.py => pyvckit/verify_vp.py | 0 9 files changed, 67 insertions(+) rename did.py => pyvckit/did.py (100%) rename sign.py => pyvckit/sign.py (100%) rename sign_vc.py => pyvckit/sign_vc.py (100%) rename sign_vp.py => pyvckit/sign_vp.py (100%) create mode 100644 pyvckit/templates.py rename utils.py => pyvckit/utils.py (100%) rename verify.py => pyvckit/verify.py (100%) rename verify_vc.py => pyvckit/verify_vc.py (100%) rename verify_vp.py => pyvckit/verify_vp.py (100%) diff --git a/did.py b/pyvckit/did.py similarity index 100% rename from did.py rename to pyvckit/did.py diff --git a/sign.py b/pyvckit/sign.py similarity index 100% rename from sign.py rename to pyvckit/sign.py diff --git a/sign_vc.py b/pyvckit/sign_vc.py similarity index 100% rename from sign_vc.py rename to pyvckit/sign_vc.py diff --git a/sign_vp.py b/pyvckit/sign_vp.py similarity index 100% rename from sign_vp.py rename to pyvckit/sign_vp.py diff --git a/pyvckit/templates.py b/pyvckit/templates.py new file mode 100644 index 0000000..210b833 --- /dev/null +++ b/pyvckit/templates.py @@ -0,0 +1,67 @@ +# templates + + +credential_tmpl = { + "@context": "https://www.w3.org/2018/credentials/v1", + "id": "http://example.org/credentials/3731", + "type": ["VerifiableCredential"], + "credentialSubject": { + "id": "did:key:z6MkgGXSJoacuuNdwU1rGfPpFH72GACnzykKTxzCCTZs6Z2M", + }, + "issuer": None, + "issuanceDate": None +} + +proof_tmpl = { + '@context':'https://w3id.org/security/v2', + 'type': 'Ed25519Signature2018', + 'proofPurpose': 'assertionMethod', + 'verificationMethod': None, + 'created': None +} + +presentation_tmpl = { + "@context": ["https://www.w3.org/2018/credentials/v1"], + "id": "http://example.org/presentations/3731", + "type": ["VerifiablePresentation"], + "holder": "", + "verifiableCredential": [] +} + + +did_document_tmpl = { + "@context": [ + "https://www.w3.org/ns/did/v1", + { + "Ed25519VerificationKey2018": "https://w3id.org/security#Ed25519VerificationKey2018", + "publicKeyJwk": { + "@id": "https://w3id.org/security#publicKeyJwk", + "@type": "@json" + } + } + ], + "id": "", + "verificationMethod": [ + { + "id": "", + "type": "Ed25519VerificationKey2018", + "controller": "", + "publicKeyJwk": { + "kty": "OKP", + "crv": "Ed25519", + "x": "" + } + } + ], + "authentication": [ + ], + "assertionMethod": [ + ], + "service": [ + { + "id": "", + "type": "RevocationBitmap2022", + "serviceEndpoint": "data:application/octet-stream;base64,eJyzMmAAAwADKABr" + } + ] +} diff --git a/utils.py b/pyvckit/utils.py similarity index 100% rename from utils.py rename to pyvckit/utils.py diff --git a/verify.py b/pyvckit/verify.py similarity index 100% rename from verify.py rename to pyvckit/verify.py diff --git a/verify_vc.py b/pyvckit/verify_vc.py similarity index 100% rename from verify_vc.py rename to pyvckit/verify_vc.py diff --git a/verify_vp.py b/pyvckit/verify_vp.py similarity index 100% rename from verify_vp.py rename to pyvckit/verify_vp.py