Reorganize files, set up testings
This commit is contained in:
1
python/cic_schema/__init__.py
Normal file
1
python/cic_schema/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .cert import Cert
|
||||
BIN
python/cic_schema/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
python/cic_schema/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
python/cic_schema/__pycache__/cert.cpython-310.pyc
Normal file
BIN
python/cic_schema/__pycache__/cert.cpython-310.pyc
Normal file
Binary file not shown.
17
python/cic_schema/cert.py
Normal file
17
python/cic_schema/cert.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# standard imports
|
||||
import sys
|
||||
|
||||
# external imports
|
||||
from rdflib import Graph
|
||||
|
||||
|
||||
class Cert:
|
||||
|
||||
def __init__(self, path):
|
||||
self.g = Graph()
|
||||
self.g.parse(path, format='turtle')
|
||||
|
||||
|
||||
def export(self, w=sys.stdout):
|
||||
v = self.g.serialize(format='xml')
|
||||
w.write(v)
|
||||
14
python/cic_schema/data/evm.rdfs
Normal file
14
python/cic_schema/data/evm.rdfs
Normal file
@@ -0,0 +1,14 @@
|
||||
@base <https://defalsify.org/rdf-eth/0.1/evm.rdfs> .
|
||||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
||||
@prefix rdfs: <https://www.w3.org/TR/rdf-schema/#> .
|
||||
|
||||
<#location> a rdfs:Class .
|
||||
<#tx> a rdfs:Class .
|
||||
<#account> rdfs:subClassOf <#location> .
|
||||
<#contract> rdfs:subClassOf <#location> .
|
||||
<#voucherContract> rdfs:subClassOf <#contract> .
|
||||
<#nftContract> rdfs:subClassOf <#contract> .
|
||||
<#gasTransfer> rdfs:subClassOf <#tx> .
|
||||
<#voucherTransfer> rdfs:subClassOf <#tx> .
|
||||
<#nftTransfer> rdfs:subClassOf <#tx> .
|
||||
<#id> rdfs:Datatype xsd:hexBinary .
|
||||
Reference in New Issue
Block a user