DPP/DLT functionality #36

Merged
pedro merged 68 commits from dpp into main 2024-12-11 15:15:14 +00:00
Showing only changes of commit 8aefc90ece - Show all commits

View file

@ -16,12 +16,12 @@ class ProofView(View):
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
timestamp = kwargs.get("proof_id") timestamp = kwargs.get("proof_id")
for p in Proof.objects.filter():
logger.error(p.timestamp)
proof = Proof.objects.filter(timestamp=timestamp).first() proof = Proof.objects.filter(timestamp=timestamp).first()
if not proof: if not proof:
return JsonResponse({}, status=404) return JsonResponse({}, status=404)
logger.error(proof.type)
logger.error(proof.signature)
ev = Evidence(proof.uuid) ev = Evidence(proof.uuid)
if not ev.doc: if not ev.doc:
@ -30,6 +30,8 @@ class ProofView(View):
dev = Build(ev.doc, None, check=True) dev = Build(ev.doc, None, check=True)
doc = dev.get_phid() doc = dev.get_phid()
logger.error(doc)
data = { data = {
"algorithm": ALGORITHM, "algorithm": ALGORITHM,
"document": json.dumps(doc) "document": json.dumps(doc)