Compare commits

...

6 Commits

Author SHA1 Message Date
Cayo Puigdefabregas 95e9ab01f0 up version 2024-05-31 20:15:44 +02:00
Cayo Puigdefabregas 54ac9a5972 fix path when import a module 2024-05-31 20:15:14 +02:00
Cayo Puigdefabregas 0dbcc6b30d fix remove templates 2024-05-31 20:07:27 +02:00
Cayo Puigdefabregas a92a9bc7d6 fix setup 2024-05-31 20:07:03 +02:00
Cayo Puigdefabregas 748dc6a24b rename LICENSE file 2024-05-31 20:06:42 +02:00
Cayo Puigdefabregas dfb80dd5cb move files to package pyvckit 2024-05-31 20:06:16 +02:00
14 changed files with 29 additions and 26 deletions

3
pyproject.toml Normal file
View File

@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

View File

@ -10,7 +10,7 @@ from jwcrypto import jwk
from urllib.parse import urlparse from urllib.parse import urlparse
from nacl.signing import SigningKey from nacl.signing import SigningKey
from nacl.encoding import RawEncoder from nacl.encoding import RawEncoder
from templates import did_document_tmpl from pyvckit.templates import did_document_tmpl
def key_to_did(public_key_bytes, url): def key_to_did(public_key_bytes, url):

View File

@ -1,9 +1,9 @@
import json import json
import argparse import argparse
from utils import now from pyvckit.utils import now
from did import generate_did, get_signing_key, key_read from pyvckit.did import generate_did, get_signing_key, key_read
from templates import credential_tmpl, proof_tmpl from pyvckit.templates import credential_tmpl, proof_tmpl
from sign import sign_proof from pyvckit.sign import sign_proof
# source: https://github.com/mmlab-aueb/PyEd25519Signature2018/blob/master/signer.py # source: https://github.com/mmlab-aueb/PyEd25519Signature2018/blob/master/signer.py

View File

@ -1,10 +1,10 @@
import json import json
import argparse import argparse
from utils import now from pyvckit.utils import now
from templates import presentation_tmpl, proof_tmpl from pyvckit.templates import presentation_tmpl, proof_tmpl
from did import key_read, generate_did, get_signing_key from pyvckit.did import key_read, generate_did, get_signing_key
from sign import sign_proof from pyvckit.sign import sign_proof
def sign_vp(signing_key, holder_did, vc): def sign_vp(signing_key, holder_did, vc):

View File

@ -6,7 +6,7 @@ import multiformats
from nacl.signing import VerifyKey from nacl.signing import VerifyKey
from sign import to_jws_payload from pyvckit.sign import to_jws_payload
def get_signing_input(payload): def get_signing_input(payload):

View File

@ -1,5 +1,5 @@
import argparse import argparse
from verify import verify_vc from pyvckit.verify import verify_vc
def get_credential(path_credential): def get_credential(path_credential):

View File

@ -1,6 +1,6 @@
import json import json
import argparse import argparse
from verify import verify_vc from pyvckit.verify import verify_vc
def get_presentation(path_presentation): def get_presentation(path_presentation):

View File

@ -9,8 +9,8 @@ test_requires = [
setup( setup(
name="pyvckit", name="pyvckit",
version="0.0.1", version="0.0.4",
packages=find_packages(), packages=['pyvckit'],
install_requires=[ install_requires=[
"jsonref", "jsonref",
"PyLD", "PyLD",

View File

@ -3,12 +3,12 @@ import multicodec
import multiformats import multiformats
import nacl.encoding import nacl.encoding
from did import generate_keys, generate_did, get_signing_key, gen_did_document from pyvckit.did import generate_keys, generate_did, get_signing_key, gen_did_document
from sign_vc import sign from pyvckit.sign_vc import sign
from sign_vp import sign_vp from pyvckit.sign_vp import sign_vp
from verify import verify_vc from pyvckit.verify import verify_vc
from verify_vp import verify_vp from pyvckit.verify_vp import verify_vp
from utils import now from pyvckit.utils import now
def test_generated_did_key(): def test_generated_did_key():

View File

@ -6,12 +6,12 @@ import didkit
# import nacl.encoding # import nacl.encoding
from ast import literal_eval from ast import literal_eval
from sign_vc import sign from pyvckit.sign_vc import sign
from sign_vp import sign_vp from pyvckit.sign_vp import sign_vp
from verify import verify_vc from pyvckit.verify import verify_vc
from verify_vp import verify_vp from pyvckit.verify_vp import verify_vp
from utils import now from pyvckit.utils import now
from did import generate_keys, generate_did, get_signing_key from pyvckit.did import generate_keys, generate_did, get_signing_key
def verify_credential(vc): def verify_credential(vc):