TyDIDs - Trust Framework
Aufbau eines Vertrauensnetzwerks basierend auf selbsbestimmte Identitäten (SSI) und Non-Fungible-Tokens (NFT) zur Durchführung einer Bilanzierung von Treibhausgasen und Herleitung einer validierbaren Minderungsquote.
- Node Module TyDIDs - Grundlagen
- Bibliothek: tydids-ghg-electricity
- Blockchain basierte Nachweisführung der THG-Emission und Minderung
- Datenblatt: Corrently GHG Blockchain
- Schritt für Schritt - E-Mobilität Treibhausgasemission
- Prämissen der Feststellung einer Treibhausgasemission
- Durchführung einer THG Feststellung - Erstellung eines THG Beleges
- Beleg über Treibhausgas Emission und Minderung
- tydidsValidation
Node Module TyDIDs - Grundlagen
Das NPM Modul von TyDIDs ist eine kleine Erweiterung von Ethers JS, welche die Nutzung innerhalb eines Trustframeworks vereinfacht. Diese Anleitung gibt eine Einführung in die Verwendung, wobei sich an einem Anwendungsfall der STROMDAO aus dem Projekt ID-Ideal für den Bereich der Energiewirtschaft orientiert wird. Diese Dokumentation vereinfacht an einigen Stellen zur besseren Verständlichkeit, soweit dies keinen Unterschied für gezeigte Funktion macht.
Anwendungsfall:
Treibhausgasminderung für die Ladung eines E-Auto.
Nach dem Abschluss eines Ladevorgangs möchte Alice (Ladende) ein Nachweis über die eingesparte Treibhausgasemissionen von Bob (Energie Service Anbieter) erhalten, welches sie in ihrer digitalen Brieftasche sammeln kann.
Anforderungen an die Umsetzung
- Alice soll mehrere Ladevorgänge bei mehreren Energie Service Anbietern vornehmen können
- Die Datenökonomie sieht vor, dass die Privatsphäre geschützt bleibt von Alice
- Durch die vorgelagerte Wahl des Ladepunktes durch Alice besteht bereits ein Vertrauensverhältnis zwischen Alice und Bob
- In den Grundlagen wird lediglich das Sammeln der Nachweise betrachtet, die Weitergabe (Veräußerung) durch Alice wird nicht betrachtet.
Ablauf der Kommunikation
- Sobald Alice den Ladevorgang beendet hat, fordert sie mit der Kennung des Ladevorgangs einen Beleg von Bob an.
- Bob ermittelt alle Daten, die zum Ladevorgang gehören (besonders die eingesparte Treibhausgasemission)
- Bob übermittelt den vollständigen Datensatz an Alice
- Alice und Bob berechnen unabhängig einen Hash für den Datensatz
- Alice fordert eine Signatur von Bob für den Ladevorgang an
- Bob schreibt den Hash des Datensatzes mit dem Vermerk, dass dieser gültig ist in die Blockchain, wodurch er einen Transaktionshash erhält
- Bob übermittelt an Alice den Transaktionshash, sowie eventuell benötigte Untermengen der bestätigen Werte digital signiert an Alice.
- Alice legt die von Bob erhalten Daten (Zertifikate/Signatur) in ihrer digitalen Brieftasche ab.
Die Schritte 1-3 gehören zum Aufgabenblock des Certificate Sign Requests.
Die Schritte 4-5 sind Zwischenschritte zur Sicherstellung einer verteilten Resilienz gegenüber Implementierungsunterschiede.
Die Schritte 7-8 gehören zum Aufgabenblock des Self Sovereign Identity Konzeptes.
Umsetzung in TyDIDs
Das Repository von Github clonen und installieren oder GitPOD verwenden.
Die gesamte Kommunikation zwischen Alice und Bob wird in der Datei index.js
implementiert werden, die zunächst wie folgt aussieht:
const tydids = require("tydids");
const app = async function() {
// Your Code HERE
}
app();
Die Zeile 5 wird gelöscht und zunächst einige Initialisierungen vorgenommen.
const walletAlice = tydids.wallet(); // Wallet mit einem zufälligen privaten Schlüssel
const walletBob = tydids.wallet(); // Wallet mit einem zufälligen privaten Schlüssel
const msgEndOfCharging = { txid: "1337", owner:walletAlice.address } // Nachricht am Ende des Ladevorgangs
Schritt 1
Alice sendet zunächst eine Nachricht an Bob mit dem Inhalt { txid: "1337" }
wodurch sie anzeigt, dass der Ladevorgang mit der Kennung 1337 beendet wurde und sie hierfür einen Beleg benötigt.
Schritt 2
const receiptPayload = {
txid: msgEndOfCharging.txid, // Ladevorgangskennung für den Beleg
owner:msgEndOfCharging.owner, // Eigentümer des Beleges
ghgSaving: 355, // Angabe über die eingesparte Treibhausgasemission
signee:walletBob.address // Bob macht sich kenntlich als der zukünftige Aussteller
}
Bob ermittelt, dass die Einsparung für diesen Ladevorgang bei 355 Gramm gelegen hat.
Schritt 3
Bob übermittelt den gesamten Inhalt von receiptPayload an Alice. Zur einfacheren Nachvollziehbarkeit lassen wir diesen Schritt auf der Konsole ausgeben.
console.log("Schritt 3",receiptPayload);
Die Ausgabe könnte wie folgt aussehen:
Schritt 3 {txid: '1337', ghgSaving: 355, signee: '0x2142141126242987D0b3FA77223434389AA99Bf3'}
Da bei jedem Aufruf ein neuer privater Schlüssel für die beiden Wallets erzeugt wird, unterscheidet sich die Angabe unter "Signee" jeweils.
Schritt 4
Sowohl Alice als auch Bob berechnen nun unabhängig voneinander einen Hash aus der Nachricht, die in Schritt 3 übermittelt wurde.
const hashAlice = walletAlice.tydids.hashMessage(receiptPayload);
const hashBob = walletBob.tydids.hashMessage(receiptPayload);
console.log("Schritt 4",hashAlice,hashBob);
Die beiden Hashes müssen übereinstimmen. Dieser Schritt ist wichtig, um zu verhindern, dass bei der Verwendung von unterschiedlichen Versionen von Bibliotheken und Implementierungen tatsächlich ein Konsens zwischen Alice und Bob besteht.
Schritt 5
Da Alice sich noch nicht ganz sicher ist, was sie später benötigt, fordert sich von Bob jetzt unterschiedliche unterschriebene Belege an.
const requestPureExistence = {
hash:hashAlice
} // Reiner Existenznachweis
const requestExistenceAndOwnership = {
hash:hashAlice
owner:walletAlice.address
} // Existenz und (initiale) Eigentümerschaft
const requestFullCertificate = {
hash:hashAlice
owner:walletAlice.address,
ghgSaving:355
} // Existenz, Eigentümerschaft und Einsparung
Schritt 6 und 7
Bei der ersten Anfrage von Alice unterzeichnet Bob den Hash lediglich und vermerkt mit einer Transaktion dies in der Blockchain (hier nicht gezeigt).
let signedPureExistence = await walletBob.tydids.signMessage(requestPureExistence);
console.log("Signatur Reiner Existenznachweis",signedPureExistence);
let hashSignedPureExistence = await walletBob.tydids.hashMessage(signedPureExistence);
console.log("Signatur Hash",hashSignedPureExistence);
Analog hierzu erstellt Bob auch die anderen beiden Unterschriften und dazugehörigen Hashes:
let signedExistenceAndOwnership = await walletBob.tydids.signMessage(requestExistenceAndOwnership);
let hashExistenceAndOwnership = await walletBob.tydids.hashMessage(signedExistenceAndOwnership);
let signedFullCertificate = await walletBob.tydids.signMessage(requestFullCertificate);
let hashFullCertificate = await walletBob.tydids.hashMessage(signedFullCertificate);
let signedTranferToken = await walletBob.tydids.signMessage(requestTranferToken);
let hashTransferToken = await walletBob.tydids.hashMessage(signedTranferToken);
Am Ende hat Alice noch eine weitere Unterschrift eingefordert für einen Transfertoken. Dieser kann nachgelagert verwendet werden, um die Eigentümerschaft des Beleges an einen Dritten zu übertragen.
Schritt 8
Alice speichert als Beleg für die Treibhausgasminderung aus diesem einen Ladevorgang, alle Unterschriften von Bob sowie die dazugehörigen Hashes.
Vollständiger Beispielcode
const tydids = require("tydids");
const app = async function() {
const walletAlice = tydids.wallet(); // Wallet mit einem zufälligen privaten Schlüssel
const walletBob = tydids.wallet(); // Wallet mit einem zufälligen privaten Schlüssel
const msgEndOfCharging = { txid: "1337",owner:walletAlice.address } // Nachricht am Ende des Ladevorgangs
const receiptPayload = {
txid: msgEndOfCharging.txid, // Ladevorgangskennung für den Beleg
owner: msgEndOfCharging.owner, // Eigentümer des Beleges
ghgSaving: 355, // Angabe über die eingesparte Treibhausgasemission
signee:walletBob.address // Bob macht sich kenntlich als der zukünftige Aussteller
}
console.log("Schritt 3",receiptPayload);
const hashAlice = walletAlice.tydids.hashMessage(receiptPayload);
const hashBob = walletBob.tydids.hashMessage(receiptPayload);
console.log("Schritt 4",hashAlice,hashBob);
const requestPureExistence = {
hash:hashAlice
} // Reiner Existenznachweis
const requestExistenceAndOwnership = {
hash:hashAlice,
owner:walletAlice.address
} // Existenz und (initiale) Eigentümerschaft
const requestFullCertificate = {
hash:hashAlice,
owner:walletAlice.address,
ghgSaving:355
} // Existenz, Eigentümerschaft und Einsparung
const requestTranferToken = {
hash:hashAlice,
transferToken: Math.random()
} // Beleg an einen anderen Eigentümer übertragen
let signedPureExistence = await walletBob.tydids.signMessage(requestPureExistence);
console.log("Signatur Reiner Existenznachweis",signedPureExistence);
let hashSignedPureExistence = await walletBob.tydids.hashMessage(signedPureExistence);
console.log("Signatur Hash",hashSignedPureExistence);
let signedExistenceAndOwnership = await walletBob.tydids.signMessage(requestExistenceAndOwnership);
let hashExistenceAndOwnership = await walletBob.tydids.hashMessage(signedExistenceAndOwnership);
let signedFullCertificate = await walletBob.tydids.signMessage(requestFullCertificate);
let hashFullCertificate = await walletBob.tydids.hashMessage(signedFullCertificate);
let signedTranferToken = await walletBob.tydids.signMessage(requestTranferToken);
let hashTransferToken = await walletBob.tydids.hashMessage(signedTranferToken);
}
app();
Ergebnis
Auf Basis der Unterschriften, die Alice von Bob erhalten hat, kann sie nun gegenüber Dritten unter voller Achtung der Privatsphäre einen Nachweis führen (Verifiable Presentation), wobei der Dritte lediglich Bobs Unterschriften vertrauen muss, nicht aber mit diesem erneut in Kontakt treten muss. Sollte Alice an den Dritten den Beleg weitergeben (Transfer der Eigentümerschaft), so wird sie den Transfertoken selbst unterschreiben und diese Unterschrift an den Dritten gemeinsam mit dem Transfertoken weitergeben. Dieser kann dann von Bob eine Vernichtung des Zertifikates von Alice anfordern und eine Neuausstellung an ihn.
Im Rahmen dieser grundlegenden Einführung wurde nicht explizit auf das Thema Aggregation oder die Verhinderung von Doppeleinlösungen eingegangen. Die Kommunikation wurde nur schematisch gezeigt. Bei einer praktischen Implementierung muss der Empfänger einer Nachricht eine abgesicherte Information über den Sender der Nachricht haben. Hier kann zum Beispiel das in der Energiewirtschaft für die Marktkommunikation verwendete AS4 Protokoll zum Einsatz kommen.
Bibliothek: tydids-ghg-electricity
Eine Open-Source Node-JS Bibliothek zur Nachweisführung der spezifischen Treibhausgasemission einzelner Ladevorgänge in der E-Mobilität. Die Bibliothek wird direkt beim Abschluss eines Ladevorgangs aufgerufen und erstellt dem Kunden (Ladenden) einen kryptografisch signierten Nachweis (Beleg), welcher in einer digitalen Brieftasche (Wallet) abgelegt werden kann. Konzeptioniert wurde tydids-ghg-electricity für den Aufruf aus bestehenden Lade-Apps, Wallbox-Apps, Energie Management Systemen und allen anderen IT-Systemen, welche im Zuge des Settlement-Ereignisses am Ende des Ladevorgangs involviert sind.
Funktionsbeschreibung
Am Ende eines Ladevorgangs ist bekannt, welche Energiemenge aus dem öffentlichen Stromnetz in das Fahrzeug geladen wurde. Zusätzlich ist der Ort der Ladung bekannt (Ladestation) und der Zeitpunkt, an dem der Vorgang beendet wurde. Mit diesen Ausgangswerten wird ein digitaler Beleg über die Treibhausgasemission durch den Energie-Service-Anbieter (ESA) erstellt, im Auftrag des Kunden.
Prämissen
Der durch die Bibliothek abgedeckte Prozessschritt beginnt am Ende des Ladevorgangs, sobald die Daten des Vorgangs am Ort der Ladung verfügbar sind und endet mit der Übermittlung der Belegdaten an den Kunden. Daraus folgt, dass vorgelagert zum Aufruf der Bibliothek die Durchführung des Ladevorgangs und die Akquise der Daten vom Messstellenbetreiber erfolgen muss. Die Absicherung dieser Daten ist nicht Aufgabe oder Bestandteil von tydids-ghg-electricity. Am Ende ist der Beleg sicher zu speichern und zu verwalten, sodass dieser durch den Berichtigten (Kunden) nutzbar bleibt. Das Belegmanagement erfolgt in der Regel durch die Nutzung einer digitalen Brieftasche (Wallet).
Interner Ablauf der Belegerstellung
Mit den Daten des abgeschlossenen Ladevorgangs wird eine (1) Beleganforderung durchgeführt. Hierfür sendet die Bibliothek eine digital unterschriebene Anforderung an den Energie-Service-Anbieter, der diese in seinem Backend verarbeitet. Die Unterschrift auf der Anforderung dient bei diesem initialen Aufruf dem Empfänger, um die folgenden Aufrufe eindeutig zum Geschäftsvorfall zuordnen zu können. Der Energie-Service-Anbieter ermittelt über sein Backend die Treibhausgasemission entlang der geltenden Standards und erstellt einen vorläufigen Beleg (Intermediate Zertifikat).
Das (2) Intermediate Zertifikat wird zurück an die Bibliothek übermittelt, welche nun die vom Aussteller gemachten Angaben prüft und einen (3) Hash-Wert über alle an dem Zertifikat zugeordneten Daten berechnet. Der Energie-Service-Anbieter führt unabhängig davon ebenfalls ein (3) Hashing durch.
Besteht über die Daten ein Konsens (gemeinsames Verständnis des Sachverhaltes), so signiert die Bibliothek den berechneten Hash-Wert digital und sendet diese Unterschrift mit einer (4) Signaturanforderung an den Energie-Service-Anbieter. Dieser prüft in seinem Backend jetzt, ob die Signatur der Anforderung zum Unterschreiber der (1) Beleganforderung passt und der übermittelte Hash-Wert mit dem unabhängig berechneten Hash-Wert übereinstimmt.
Zum Abschluss des Vorgangs wird das (5) signierte Zertifikat an die tydids-ghg-electricity Bibliothek übermittelt. Die Bibliothek führt über alle im Zertifikat enthaltenen Daten und Präsentationsformen eine erneute Validierung durch, bevor das Zertifikat als JSON-Dokument dem aufrufenden System übergeben werden.
Testen von tydids-ghg-electricity
Um die Bibliothek testen zu können, ohne dass die Prämissen geschaffen wurden, wird die Option für eine Ausführung auf der Befehlszeile (CLI) bereitgestellt.
Option A: Testen auf GitPod.io
Option B: Installation
Es wird Node JS ab Version 14 auf dem System benötigt!
npm install -g tydids-ghg-electricity
Die Kurz-Hilfe kann durch tydids-ghg-electricity -h
aufgerufen werden:
Usage: tydids-ghg-certificate [options] [command]
TyDIDs based Greenhouse Gas Certificates.
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
requestCertificate [options] <zip> <wh> Get a new signed certificate for electricity consumption (Germany only!)
validateCertificate <certificate> <hash> <issuer> <owner> Validates given Certificate JSON
help [command] display help for command
Erstellen des ersten Belegs
tydids-ghg-certificate requestCertificate 69256 123
Dieser Aufruf fordert für einen Ladevorgang am Ort mit der Postleitzahl 69256 (=Mauer) einen Beleg über 123 Wh (=0,123 kWh) an. Die Ausgabe erfolgt auf dem Bildschirm.
Hinweis
Die Bibliothek tydids-ghg-electricity ist im Umfeld des Projektes ID-Ideal sicheres Management Digitaler Identitäten entstanden. Das Projekt wird im Rahmen des Innovationswettbewerbs „Schaufenster Sichere Digitale Identitäten“ des Bundesministeriums für Wirtschaft und Klimaschutz (BMWK) gefördert. Während der dreijährigen Projektphase soll der Umgang mit digitalen Identitäten in Wirtschaft und Verwaltung sicherer und einfacher gestaltet werden. Eine besondere Rolle spielt dabei die breitenwirksame Anwendung der erarbeiteten Lösung in verschiedenen Sektoren. Dazu bilden mehrere Kommunen, Industriepartner, Technologieunternehmen sowie ID-Dienste ein Konsortium. Das Arbeitspaket Energie nutzt selbst souveräne Unternehmens-, Maschinen- und Personenidentitäten für hochauflösende Herkunftszertifikate für Strom. Diese werden zunächst beim Stromerzeuger erstellt und dann über die verschiedenen Akteure im Strommarkt bis an den Endverbraucher weitergeleitet. Im Rahmen einer prototypischen Implementierung sollen die CO₂-Emissionen beim Laden eines E-Autos bestimmt werden. Ziel ist die Entwicklung einer Ende-zu-Ende-Architektur, die verifizierbare CO₂-Nachweise für Endverbraucher als Grundlage für innovative Geschäftsmodelle und Nachhaltigkeitskonzepte ermöglicht.
Rechteinhaber / Copyright
STROMDAO GmbH
Gerhard Weiser Ring 29
69256 Mauer
Germany
+49 6226 968 009 0
https://stromdao.de/
kontakt@stromdao.com
Handelsregister: HRB 728691 (Amtsgericht Mannheim)
Lizenz: Apache License 2.0
Blockchain basierte Nachweisführung der THG-Emission und Minderung
Die Open-Source Bibliothek tydids-ghg-electricity (Dokumentation) erlaubt die Erstellung von Belegen über Treibhausgasemissionen nach dem Bezug von Strom aus dem öffentlichen Netz. Diese Belegerstellung wird mithilfe von digitalen Identitäten (DIDs) und der Distributed-Ledger-Technology (Blockchain) abgesichert. Hierdurch wird nach dem Stand der Technik eine sichere, vertrauenswürdige und datenschutzkonforme Lösung bereitgestellt, die zum Beispiel bei der Abrechnung von Ladevorgängen in der E-Mobilität zum Einsatz kommen kann.
Dieser Beitrag geht auf das Ergebnis des Prozesses ein, welcher mit der genannten Bibliothek durchgeführt wird. An dessen Ende ist ein elektronischer Beleg vorhanden, welcher unabhängig von Dritten, die nicht ursprünglich am Vorgang oder der Erstellung beteiligt gewesen sind, prüfbar ist. Diese als dritte Partei bezeichnete Entität kann zum Beispiel ein Auditor bei einer Nachhaltigkeitszertifizierung sein, oder das Umweltbundesamt im Rahmen der Bescheinigung einer THG-Minderung nach §6 und §7 der 38. BImSchV. Für den Dritten ist eine lückenlose Nachvollziehbarkeit der THG-Emission wichtig, wobei der Beleg alle technischen Voraussetzungen enthalten muss, die für eine Überprüfung notwendig sind. Umgesetzt werden die technischen Voraussetzungen durch die Verwendung von digitalen Signaturen über einen Datensatz, welche zum einen offenlegen, wer die gemachten Angaben bestätigt, zum anderen eine Unveränderbarkeit der belegten Daten sicherstellt.
Im Ablaufplan zur tydids-ghg-electricity Bibliothek ist die Erstellung des Beleges vollständig auf der Seite des Provider-Backends angesiedelt. D.h. die Absicherung und damit die Grundlage für die Nachweisführung werden im Backend des Energieserviceanbieters geschaffen. Durchgeführt werden diese nach dem Eingang einer (4) Signaturanforderung und sind abgeschlossen vor der Herausgabe des (5) signierten Zertifikates.
Non-Fungible Token (NFT)
Ein Non-Fungible Token (NFT) ist ein „kryptografisch eindeutiges, unteilbares, unersetzbares und überprüfbares Token, das einen bestimmten Gegenstand, sei er digital oder physisch, in einer Blockchain repräsentiert“.[1][2] Während NFTs mit der Blockchain dieselbe Technologie benutzen wie Kryptowährungen, sind sie im Unterschied zu diesen einmalig und nicht teilbar (non-fungible, dts.: „nicht austauschbar“). Ein NFT kann nur als Ganzes erworben werden und existiert nur ein einziges Mal – anders als bei der Möglichkeit, beispielsweise 0,05 Ethereum zu erwerben, bei der es für den Wert keine Rolle spielt, an welchem davon man einen Anteil erwirbt.[3]
Neben dem digitalen Zertifikat wird vom Energieserviceanbieter ein NFT an den Kunden herausgegeben. Der in der Definition von Wikipedia aufgeführte "bestimmte Gegenstand" ist der Beleg selbst, bzw. dessen eindeutige Kennung. Umgangssprachlich kann diese Kennung als Belegnummer gesehen werden, technisch handelt es sich allerdings um eine dezentrale Identität (DID). Woraus sich schließen lässt, dass der Beleg selbst eine Identität/Persönlichkeit erhält, welche nur durch diesen einen Beleg (konfliktfrei) mit dieser bestimmten Kennung vorhanden ist. Der NFT enthält somit als "Gegenstand" lediglich diese eindeutige Kennung (DID).
Die STROMDAO GmbH als Energieserviceanbieter verwendet für die Herausgabe von NFTs eine Blockchain nach dem Ethereum Protokoll mit der Kennung "6226", welche öffentlich zugreifbar ist. Für die Verbindung eines Clients (zum Beispiel Metamask) kann die RPC-URL https://integration.corrently.io/ verwendet werden.
Aufbau einer DID
Beispiel für die DID eines Beleges für die Treibhausgasemissionen eines Ladevorgangs, wie er im Backend der STROMDAO GmbH ausgestellt wurde:
"did:ethr:6226:0xAD7df95e5d5a7812feC055184FF8A929Fb93D5E6:0x8956e59D8C2da8ba407357bd021808784c164EFB"
Diese Kennung setzt sich aus verschiedenen Elementen zusammen (Schema):
did:ethr
- Generelles Schema für eine Dezentrale Identität auf Basis des Ethereum Protokolls.6226
- Anzeige der Blockchain, in der die Transaktion der Belegerstellung festgehalten wird.0xAD7df95e5d5a7812feC055184FF8A929Fb93D5E6
- Die DID Registry, welche für den Lebenszyklus des Beleges genutzt wird.0x8956e59D8C2da8ba407357bd021808784c164EFB
- Eindeutige Kennung für den Beleg selbst.
Diese DID (Kennung) wird durch den Energieserviceanbieter nach der Ausstellung eines Beleges in einer Transaktion auf die Blockchain durch Ausführen einer Smart-Contract Methode des NFTs geschrieben ("mint()
"). D.h. sobald diese Transaktion in der Blockchain bestätigt ist, existiert ein eindeutiger Nachweis, dass der Beleg (DID) existiert und wer der Eigentümer und Aussteller dieses Beleges ist.
NFT Contract der STROMDAO GmbH: 0x778BEDBf206C2f402c513F5612019FF63d05A25E
(ABI)
Digitales Eigentum durch NFT
Das Konzept der Non-Fungible Token wird eingesetzt, um die Existenz und das Eigentum an einem Beleg über einen Fakt (hier Ladevorgang) zu dokumentieren. Eigentum ist in der Regel etwas mit Wert, was jedoch beim ursprünglichen Sachverhalt der Treibhausgasemissionen so nicht zutrifft. Verursachte Schadstoffemission hat zunächst einen negativen Wert, der Beleg darüber ist somit ebenfalls negativ attribuiert. Vergleichbar ist diese Tatsache mit dem Beleg über das Parken in einer Parkverbotszone (=Strafzettel). Der ausgestellte NFT lässt jedoch keine Rückschlüsse auf die eigentlichen Belegdaten zu. Für den Fall der THG-Emission ist dies die Höhe der Emission, bei einem Strafzettel ist es das Kennzeichen des Fahrzeugs oder die Dauer des Parkens.
Das Erkennen von Eigentumsverhältnissen erfolgt auf Basis der Blockchain Kennung. Jede Self Sovereign Identity (SSI/selbstbestimmte Identität) hat eine eigene Kennung, auf die eine digitale Unterschrift eindeutig zugeordnet werden kann. Wichtig ist, dass die Blockchain Kennung (auch Adresse) keine Rückschlüsse auf die Self Sovereign Identity zulässt und auch keine weiteren Informationen/Daten offenlegt.
Der Smart-Contract, welcher die interne Funktion und das Regelwerk des NFTs beschreibt, hat selbst einen Eigentümer, welcher über die owner()
Methode abgefragt werden kann. Im Fall des Vertrags mit der Blockchain Kennung 0x984733860c7EdEb2c8072BF897A6633a8B53F43A
ergibt dies die Blockchain Kennung 0xE7Fe0626D7B8e3F2e5ECD146F9b11daac1DBE447
, die durch die STROMDAO GmbH genutzt wird. Der Smart-Contract regelt, dass nur Transaktionen, welche von dieser Kennung unterzeichnet sind, für den Aufruf der Belegerstellungsfunktion mint()
zulässig sind. Bei der Erstellung muss ein Eigentümer des Beleges angegeben werden. Diesem Belegeigentümer wird eine fortlaufende Belegnummer (tokenID) zugeordnet, die nach den Regeln des Vertrages nicht doppelt verwendet werden kann.
Hier ist die Analogie zum Strafzettel anwendbar. Der Aussteller des NFTs kann nachweisen, dass die einzelnen Belege lückenlos sind und keine doppelte Vergabe stattgefunden hat. Jeder Beleg hat einen eindeutigen Empfänger, welcher unumstritten ist (=Konsens).
Datenblatt: Corrently GHG Blockchain
Primary RPC URL: https://rpc.tydids.com/
Chain ID: 6226
NFT STROMDAO: 0xf0D4F76638b78cFB7d1CfFcFa2C8D9496f1B5DE4
DID-Registry: 0x86D1570f94856525848110c95c0F5FFA154b57E3
Schritt für Schritt - E-Mobilität Treibhausgasemission
In dieser Anleitung werden die einzelnen Schritte im Kontext der Treibhausgasermittlung für einen Ladevorgang eines Fahrzeuges gezeigt.
Prämissen der Feststellung einer Treibhausgasemission
Am Ende eines Ladevorgangs eines E-Autos ist die beim Ladevorgang bezogene Strommenge bekannt. Der Ladende erhält nun vom Energie Service Anbieter einen Beleg für den Ladevorgang. Dieser Beleg ist die Strom-Quittung und enthält neben Informationen zur Abrechnung auch Informationen zur bezogenen Strommenge. Das Mess- und Eichrecht schafft die Grundlage dafür, dass die Strommenge, die auf dem Beleg ausgegeben ist, der tatsächlichen vom Ladenden bezogenen Menge entspricht. Das Verfahren der Abgrenzung wird durch das Messstellenbetriebsgesetz geregelt.
Prämissen / Vorbedingung
Quelle / Herkunft der Parameter
Die Daten, die für die Feststellung der Treibhausgasemission benötigt werden, fallen in den Zuständigkeitsbereich des Messstellenbetreiber (MSB), welcher diese technisch von den Stromzählern abliest und in geeigneter Form den Berechtigten zur Verfügung stellt.
Parameter
- Strommenge in Watt-Stunden
- Ort des Strombezuges (Messlokationskennung - MeLoID)
- Zeitraum des Strombezuges
- Berechtigter Akteur
Als berechtigter Akteur wird der Empfänger der Strom-Quittung bezeichnet (=Kunde). Dies können unterschiedliche Entitäten sein:
- Fahrer (Personen Entität)
- Fahrzeughalter (Juristische Entität)
- Fahrzeug (Maschinen Entität)
- Ladepunkt (Maschinen Entität)
- Ladepunktbetreiber (Juristische Entität)
Regel der Eindeutigkeit
Der Nachweis der Treibhausgasemission wird für jeden Vorgang nur gegenüber einer Entität gemacht. Eine beleghafte Berechnung der Emission zu einem Vorgang an mehrere Entitäten ist nicht zulässig. Zur Sicherstellung dieser Bedingung ist der Messstellenbetreiber verpflichtet und kommt dieser Verpflichtung durch eine Fortschreibung des Zählerstandes bei einer eindeutigen Messlokationskennung nach. Der Messstellenbetreiber führt eine Vorgangs-scharfe Abgrenzung durch. Ein Vorgang entspricht im Kontext der E-Mobilität einem Ladevorgang.
Im Rahmen der beleghaften Feststellung der Treibhausgasemission zeichnet sich die Entität durch eine digitale Identität aus. Vereinfacht ausgedrückt ist die Entität im Besitz eines digitalen Schlüssels, mit dem diese eindeutig Daten unterzeichnen kann, sodass die digitale Unterschrift eindeutig der Entität zuordenbar ist.
Durchführung einer THG Feststellung - Erstellung eines THG Beleges
Sobald alle Prämissen erfüllt sind, kann ein Beleg erstellt werden. Dieser Prozess gliedert sich in 5 Schritte, welche mit der Bibliothek ghg-wallet durchgeführt werden können.
Am Ende eines vollständig durchlaufenen Feststellungsprozesses für Treibhausgasemissionen existieren:
- JSON Zertifikat als Beleg, welches vom Energie Service Anbieter (ESA) unterzeichnet ist
- Eine Anzahl von Verifieable Presentations, in denen der ESA den Sachverhalt der durchführenden Entität besteht
- Es wurde in None-Fungible-Token (NFT) emittiert, der die Eigentümerschaft des Beleges (DID) regelt
- Es wurden in zwei ERC20 Tokens für die Emission und die Einsparung neue Tokens generiert und dem Beleg zugeordnet
Beispiel Durchführung: https://runkit.com/zoernert/ghg-wallet-hello-world
const GHGWALLET = require("ghg-wallet")
// Setup some random dummy for certificate
const zip = '69256';
const wh = Math.round(Math.random() * 5000 +100);
const context = {usage:'Straßenverkehr'};
const app_wallet = await GHGWALLET.ghgwallet(/* Insert a Private Key here if you like*/);
// Request Intermediate
const intermediate = await app_wallet.app.requestIntermediate(zip,wh,context);
const testHash = await app_wallet.tydids.hashMessage(intermediate.payload)
console.log('Always validate hashes!');
// and some other values from intermediate. See test cases in Repository
if(testHash !== intermediate.hash) throw "Big Failure";
// Request Certificate
const certificate = await app_wallet.app.requestCertification(intermediate);
console.log(certificate);
Ergebnis (Beispiel)
Aufruf 06.12.2022 13:36 Uhr: ghg-certRequest -w 1234 -l 69256 -c certificate.json
Ausgabe: certificate.json
Beleg der Emission eines Ladevorgangs (certificate.json)
{
"hash": {
"signature": "0xa7bf55d76e16971460525d279f1e89f60a3159e814bb0223cab60a66f759743f41b1a622798df782d810cfd5ebc82c2a9fd4d245c30029bf0a16b8ff04d65def1c",
"payload": "0xcf1bc8e0a0686792e81fb1bc9d348bfed7f0f458d16aa7691f9ebcde2d3d531f"
},
"owner": {
"signature": "0x1ca8404686eedd630877524838ad540e4386c9c46dda8ca5bfa7b2d8923d32e94c9a979ae8260f374b55a83cc7d45eab66fe3b71b014d81ab4340d93064cfe121b",
"payload": {
"owner": "0xe6b271930BeFf20A1e11644c37328dfee8cf3946",
"issuer": "0xE7Fe0626D7B8e3F2e5ECD146F9b11daac1DBE447",
"hash": "0xcf1bc8e0a0686792e81fb1bc9d348bfed7f0f458d16aa7691f9ebcde2d3d531f"
}
},
"context": {
"signature": "0xf2ba032409ece4c815af222077ddedc4c5c76e262a8ecd346a6dcfd153ba0bdc751f0d4bd8310029bc6ad753abe0214f9cdcc952da434ca6be553bd9aa37d0da1b",
"payload": {
"usage": "Straßenverkehr",
"hash": "0xcf1bc8e0a0686792e81fb1bc9d348bfed7f0f458d16aa7691f9ebcde2d3d531f"
}
},
"did": {
"signature": "0xb8d90bde6845990c1c9f2f40af8ca01d9faa3ddd2b9a3f6be42c6df287f3fa79172aecccba8616f92551d94c14aa72743b588f31b28079cd81a795180cabb8321c",
"payload": {
"url": "did:ethr:6226:0x86D1570f94856525848110c95c0F5FFA154b57E3:0xF85f715204EA343277bDE713935EBF885083e5f5",
"registry": "0x86D1570f94856525848110c95c0F5FFA154b57E3",
"uid": "0xF85f715204EA343277bDE713935EBF885083e5f5",
"schema": "did",
"method": "ethr:6226",
"ghgtoken": {
"address": "0xFBe3428A58DAF225D84Ccf2a7A87892d53CC1b88",
"certificates": "0xf0D4F76638b78cFB7d1CfFcFa2C8D9496f1B5DE4",
"savings": "0x3DB8AdC77cc25791cE3860DFa3630c9116FA1A96",
"emissions": "0x68c2046c5dA08B140A509afCbA6f4C715e807d28"
},
"nft": {
"signature": "0xbeb8149f15a8c8c0c81d47018e9c6aaf8292ab8a2b86dc940a17228eba79d2840266feae2ab25ee22d839269a76ccbc750133a85bc9e8568d4b619124ff7397f1c",
"payload": {
"address": "0xf0D4F76638b78cFB7d1CfFcFa2C8D9496f1B5DE4",
"tx": {
"nonce": 56,
"gasPrice": {
"type": "BigNumber",
"hex": "0x3b9aca00"
},
"gasLimit": {
"type": "BigNumber",
"hex": "0x03984d"
},
"to": "0xFBe3428A58DAF225D84Ccf2a7A87892d53CC1b88",
"value": {
"type": "BigNumber",
"hex": "0x00"
},
"data": "0xa578e29c000000000000000000000000e6b271930beff20a1e11644c37328dfee8cf3946000000000000000000000000f85f715204ea343277bde713935ebf885083e5f500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000017600000000000000000000000000000000000000000000000000000000000000a500000000000000000000000000000000000000000000000000000000000000553078383644313537306639343835363532353834383131306339356330463546464131353462353745333a3078463835663731353230344541333433323737624445373133393335454246383835303833653566350000000000000000000000",
"chainId": 6226,
"v": 12487,
"r": "0x83cbe30e47941fb2398c4a48adc55104e5324f16d11416916847b9537c1f58c5",
"s": "0x31c5f872babd4ccdba26d82683c5879c816da72a4063ca0547e2c52b4ebd21a5",
"from": "0xE7Fe0626D7B8e3F2e5ECD146F9b11daac1DBE447",
"hash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"type": null,
"confirmations": 0
},
"receipt": {
"to": "0xFBe3428A58DAF225D84Ccf2a7A87892d53CC1b88",
"from": "0xE7Fe0626D7B8e3F2e5ECD146F9b11daac1DBE447",
"contractAddress": null,
"transactionIndex": 0,
"gasUsed": {
"type": "BigNumber",
"hex": "0x039699"
},
"logsBloom": "0x02000000002000000000000000000000000000000000000000000000008000000000010800000000000000000000000000000000000000000000000000000000000400000000000000000008000000001000000000000000000000000002000000000000020000000000000000000800000000000004000000000010000000000000000000000020000000080000000000000004000020080000000000000000000100000000000000000000000000000000000002000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000002000000000000000000000000000",
"blockHash": "0x1780dc06e4261fb4f57a19f6d668345e15ec31a7783c5b50a05453b48b4ed8a0",
"transactionHash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"logs": [
{
"transactionIndex": 0,
"blockNumber": 14214,
"transactionHash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"address": "0xf0D4F76638b78cFB7d1CfFcFa2C8D9496f1B5DE4",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000e6b271930beff20a1e11644c37328dfee8cf3946",
"0x0000000000000000000000000000000000000000000000000000000000000030"
],
"data": "0x",
"logIndex": 0,
"blockHash": "0x1780dc06e4261fb4f57a19f6d668345e15ec31a7783c5b50a05453b48b4ed8a0"
},
{
"transactionIndex": 0,
"blockNumber": 14214,
"transactionHash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"address": "0x3DB8AdC77cc25791cE3860DFa3630c9116FA1A96",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000f85f715204ea343277bde713935ebf885083e5f5"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000000a5",
"logIndex": 1,
"blockHash": "0x1780dc06e4261fb4f57a19f6d668345e15ec31a7783c5b50a05453b48b4ed8a0"
},
{
"transactionIndex": 0,
"blockNumber": 14214,
"transactionHash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"address": "0x68c2046c5dA08B140A509afCbA6f4C715e807d28",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000f85f715204ea343277bde713935ebf885083e5f5"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000176",
"logIndex": 2,
"blockHash": "0x1780dc06e4261fb4f57a19f6d668345e15ec31a7783c5b50a05453b48b4ed8a0"
}
],
"blockNumber": 14214,
"confirmations": 1,
"cumulativeGasUsed": {
"type": "BigNumber",
"hex": "0x039699"
},
"effectiveGasPrice": {
"type": "BigNumber",
"hex": "0x3b9aca00"
},
"status": 1,
"type": 0,
"byzantium": true
},
"tokenId": "0x0000000000000000000000000000000000000000000000000000000000000030"
}
},
"hash": "0xcf1bc8e0a0686792e81fb1bc9d348bfed7f0f458d16aa7691f9ebcde2d3d531f"
}
},
"presentations": {
"type": {
"signature": "0xa6c27697b4f526292c5728d12f28d3f41d4dd278a1e134193332b5b1f25a133b42c94d06911a81a250df0c3c11a5ed0454f6a9ede14807eb967b563ea2c1e94f1b",
"payload": "electricity consumption from public grid",
"$schema": "https://schema.corrently.io/tydids/type"
},
"context": {
"signature": "0x1c3de7f4598c864ba97ef017b8d6de2b44af0de6f342f69b0fdb17c0345555b654a38b9fca934b10faa9900966cd94ef895a33eac94d78ec43b184f58df3de761c",
"payload": {
"usage": "Straßenverkehr",
"hash": "0xcf1bc8e0a0686792e81fb1bc9d348bfed7f0f458d16aa7691f9ebcde2d3d531f"
},
"$schema": "https://schema.corrently.io/tydids/context"
},
"location": {
"signature": "0x43f67dcdefe21a25e1f8780920e32ffc2cf59fd4857c5dea6edeb68282ffc09c315f2729436d960a0d7c34458e93c3d97a2fa1e04a6c871dec843874c3db6d4f1b",
"payload": {
"zip": "69256",
"city": "Mauer",
"country": "Germany",
"meloid": "DETESTSD133713371337133713371337",
"hash": "0xcf1bc8e0a0686792e81fb1bc9d348bfed7f0f458d16aa7691f9ebcde2d3d531f"
},
"$schema": "https://schema.corrently.io/tydids/location"
},
"consumption": {
"signature": "0xcb4265be6a0bde5abbf6362fd0e703909c26c0329f4cb6e5309f6591a160553a2a6e1886bc875b1bb63262567633bffcbe29591bf81e0bc8257594390572f4231b",
"payload": {
"unit": "wh",
"actual": 1234,
"time": 1670330118430,
"hash": "0xcf1bc8e0a0686792e81fb1bc9d348bfed7f0f458d16aa7691f9ebcde2d3d531f"
},
"$schema": "https://schema.corrently.io/tydids/consumption"
},
"ghg": {
"signature": "0xf2052c95fd16289fc509e1a7c0c3c0576d4b8dd09f8f47134f283e1469ff0c8854d76000958452504b29f0df7afb0353e756e7b90fef342f76f76c5c6912bb921b",
"payload": {
"factors": {
"unit": "g co2eq per wh",
"actual": {
"grid": 0.303,
"eco": 0.024
},
"base": {
"grid": 0.437
}
},
"base": {
"unit": "g co2eq",
"grid": 539
},
"actual": {
"unit": "g co2eq",
"grid": 374,
"eco": 30
},
"saving": {
"unit": "g co2eq",
"grid": 165
},
"scope": 2,
"hash": "0xcf1bc8e0a0686792e81fb1bc9d348bfed7f0f458d16aa7691f9ebcde2d3d531f"
},
"$schema": "https://schema.corrently.io/tydids/ghg"
},
"did": {
"signature": "0x7d1d3c44091cb3710df12515c8c132d53e3de8490b15271ffcddeace53ff315114c27b150e9351db075c5e485ff148747c14eeb11cc2c7931c308632c2f7c6d31b",
"payload": {
"url": "did:ethr:6226:0x86D1570f94856525848110c95c0F5FFA154b57E3:0xF85f715204EA343277bDE713935EBF885083e5f5",
"registry": "0x86D1570f94856525848110c95c0F5FFA154b57E3",
"uid": "0xF85f715204EA343277bDE713935EBF885083e5f5",
"schema": "did",
"method": "ethr:6226",
"ghgtoken": {
"address": "0xFBe3428A58DAF225D84Ccf2a7A87892d53CC1b88",
"certificates": "0xf0D4F76638b78cFB7d1CfFcFa2C8D9496f1B5DE4",
"savings": "0x3DB8AdC77cc25791cE3860DFa3630c9116FA1A96",
"emissions": "0x68c2046c5dA08B140A509afCbA6f4C715e807d28"
},
"nft": {
"signature": "0xbeb8149f15a8c8c0c81d47018e9c6aaf8292ab8a2b86dc940a17228eba79d2840266feae2ab25ee22d839269a76ccbc750133a85bc9e8568d4b619124ff7397f1c",
"payload": {
"address": "0xf0D4F76638b78cFB7d1CfFcFa2C8D9496f1B5DE4",
"tx": {
"nonce": 56,
"gasPrice": {
"type": "BigNumber",
"hex": "0x3b9aca00"
},
"gasLimit": {
"type": "BigNumber",
"hex": "0x03984d"
},
"to": "0xFBe3428A58DAF225D84Ccf2a7A87892d53CC1b88",
"value": {
"type": "BigNumber",
"hex": "0x00"
},
"data": "0xa578e29c000000000000000000000000e6b271930beff20a1e11644c37328dfee8cf3946000000000000000000000000f85f715204ea343277bde713935ebf885083e5f500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000017600000000000000000000000000000000000000000000000000000000000000a500000000000000000000000000000000000000000000000000000000000000553078383644313537306639343835363532353834383131306339356330463546464131353462353745333a3078463835663731353230344541333433323737624445373133393335454246383835303833653566350000000000000000000000",
"chainId": 6226,
"v": 12487,
"r": "0x83cbe30e47941fb2398c4a48adc55104e5324f16d11416916847b9537c1f58c5",
"s": "0x31c5f872babd4ccdba26d82683c5879c816da72a4063ca0547e2c52b4ebd21a5",
"from": "0xE7Fe0626D7B8e3F2e5ECD146F9b11daac1DBE447",
"hash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"type": null,
"confirmations": 0
},
"receipt": {
"to": "0xFBe3428A58DAF225D84Ccf2a7A87892d53CC1b88",
"from": "0xE7Fe0626D7B8e3F2e5ECD146F9b11daac1DBE447",
"contractAddress": null,
"transactionIndex": 0,
"gasUsed": {
"type": "BigNumber",
"hex": "0x039699"
},
"logsBloom": "0x02000000002000000000000000000000000000000000000000000000008000000000010800000000000000000000000000000000000000000000000000000000000400000000000000000008000000001000000000000000000000000002000000000000020000000000000000000800000000000004000000000010000000000000000000000020000000080000000000000004000020080000000000000000000100000000000000000000000000000000000002000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000002000000000000000000000000000",
"blockHash": "0x1780dc06e4261fb4f57a19f6d668345e15ec31a7783c5b50a05453b48b4ed8a0",
"transactionHash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"logs": [
{
"transactionIndex": 0,
"blockNumber": 14214,
"transactionHash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"address": "0xf0D4F76638b78cFB7d1CfFcFa2C8D9496f1B5DE4",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000e6b271930beff20a1e11644c37328dfee8cf3946",
"0x0000000000000000000000000000000000000000000000000000000000000030"
],
"data": "0x",
"logIndex": 0,
"blockHash": "0x1780dc06e4261fb4f57a19f6d668345e15ec31a7783c5b50a05453b48b4ed8a0"
},
{
"transactionIndex": 0,
"blockNumber": 14214,
"transactionHash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"address": "0x3DB8AdC77cc25791cE3860DFa3630c9116FA1A96",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000f85f715204ea343277bde713935ebf885083e5f5"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000000a5",
"logIndex": 1,
"blockHash": "0x1780dc06e4261fb4f57a19f6d668345e15ec31a7783c5b50a05453b48b4ed8a0"
},
{
"transactionIndex": 0,
"blockNumber": 14214,
"transactionHash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"address": "0x68c2046c5dA08B140A509afCbA6f4C715e807d28",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000f85f715204ea343277bde713935ebf885083e5f5"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000176",
"logIndex": 2,
"blockHash": "0x1780dc06e4261fb4f57a19f6d668345e15ec31a7783c5b50a05453b48b4ed8a0"
}
],
"blockNumber": 14214,
"confirmations": 1,
"cumulativeGasUsed": {
"type": "BigNumber",
"hex": "0x039699"
},
"effectiveGasPrice": {
"type": "BigNumber",
"hex": "0x3b9aca00"
},
"status": 1,
"type": 0,
"byzantium": true
},
"tokenId": "0x0000000000000000000000000000000000000000000000000000000000000030"
}
},
"hash": "0xcf1bc8e0a0686792e81fb1bc9d348bfed7f0f458d16aa7691f9ebcde2d3d531f"
},
"$schema": "https://schema.corrently.io/tydids/did"
},
"_all": {
"signature": "0x12e5896dc0eeb90d2f964b1ec319f7d9f58bbbcff3fe65a6d6371f61bfe12f6012a09f448939225eb93df604e30712022922fc9133eec6b9563f9963b1100bd01c",
"payload": {
"type": "electricity consumption from public grid",
"context": {
"usage": "Straßenverkehr",
"hash": "0xcf1bc8e0a0686792e81fb1bc9d348bfed7f0f458d16aa7691f9ebcde2d3d531f"
},
"location": {
"zip": "69256",
"city": "Mauer",
"country": "Germany",
"meloid": "DETESTSD133713371337133713371337",
"hash": "0xcf1bc8e0a0686792e81fb1bc9d348bfed7f0f458d16aa7691f9ebcde2d3d531f"
},
"consumption": {
"unit": "wh",
"actual": 1234,
"time": 1670330118430,
"hash": "0xcf1bc8e0a0686792e81fb1bc9d348bfed7f0f458d16aa7691f9ebcde2d3d531f"
},
"ghg": {
"factors": {
"unit": "g co2eq per wh",
"actual": {
"grid": 0.303,
"eco": 0.024
},
"base": {
"grid": 0.437
}
},
"base": {
"unit": "g co2eq",
"grid": 539
},
"actual": {
"unit": "g co2eq",
"grid": 374,
"eco": 30
},
"saving": {
"unit": "g co2eq",
"grid": 165
},
"scope": 2,
"hash": "0xcf1bc8e0a0686792e81fb1bc9d348bfed7f0f458d16aa7691f9ebcde2d3d531f"
},
"_iat": 1670330118490,
"_iss": "0xE7Fe0626D7B8e3F2e5ECD146F9b11daac1DBE447",
"_jti": "0xF85f715204EA343277bDE713935EBF885083e5f5",
"did": {
"url": "did:ethr:6226:0x86D1570f94856525848110c95c0F5FFA154b57E3:0xF85f715204EA343277bDE713935EBF885083e5f5",
"registry": "0x86D1570f94856525848110c95c0F5FFA154b57E3",
"uid": "0xF85f715204EA343277bDE713935EBF885083e5f5",
"schema": "did",
"method": "ethr:6226",
"ghgtoken": {
"address": "0xFBe3428A58DAF225D84Ccf2a7A87892d53CC1b88",
"certificates": "0xf0D4F76638b78cFB7d1CfFcFa2C8D9496f1B5DE4",
"savings": "0x3DB8AdC77cc25791cE3860DFa3630c9116FA1A96",
"emissions": "0x68c2046c5dA08B140A509afCbA6f4C715e807d28"
},
"nft": {
"signature": "0xbeb8149f15a8c8c0c81d47018e9c6aaf8292ab8a2b86dc940a17228eba79d2840266feae2ab25ee22d839269a76ccbc750133a85bc9e8568d4b619124ff7397f1c",
"payload": {
"address": "0xf0D4F76638b78cFB7d1CfFcFa2C8D9496f1B5DE4",
"tx": {
"nonce": 56,
"gasPrice": {
"type": "BigNumber",
"hex": "0x3b9aca00"
},
"gasLimit": {
"type": "BigNumber",
"hex": "0x03984d"
},
"to": "0xFBe3428A58DAF225D84Ccf2a7A87892d53CC1b88",
"value": {
"type": "BigNumber",
"hex": "0x00"
},
"data": "0xa578e29c000000000000000000000000e6b271930beff20a1e11644c37328dfee8cf3946000000000000000000000000f85f715204ea343277bde713935ebf885083e5f500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000017600000000000000000000000000000000000000000000000000000000000000a500000000000000000000000000000000000000000000000000000000000000553078383644313537306639343835363532353834383131306339356330463546464131353462353745333a3078463835663731353230344541333433323737624445373133393335454246383835303833653566350000000000000000000000",
"chainId": 6226,
"v": 12487,
"r": "0x83cbe30e47941fb2398c4a48adc55104e5324f16d11416916847b9537c1f58c5",
"s": "0x31c5f872babd4ccdba26d82683c5879c816da72a4063ca0547e2c52b4ebd21a5",
"from": "0xE7Fe0626D7B8e3F2e5ECD146F9b11daac1DBE447",
"hash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"type": null,
"confirmations": 0
},
"receipt": {
"to": "0xFBe3428A58DAF225D84Ccf2a7A87892d53CC1b88",
"from": "0xE7Fe0626D7B8e3F2e5ECD146F9b11daac1DBE447",
"contractAddress": null,
"transactionIndex": 0,
"gasUsed": {
"type": "BigNumber",
"hex": "0x039699"
},
"logsBloom": "0x02000000002000000000000000000000000000000000000000000000008000000000010800000000000000000000000000000000000000000000000000000000000400000000000000000008000000001000000000000000000000000002000000000000020000000000000000000800000000000004000000000010000000000000000000000020000000080000000000000004000020080000000000000000000100000000000000000000000000000000000002000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000002000000000000000000000000000",
"blockHash": "0x1780dc06e4261fb4f57a19f6d668345e15ec31a7783c5b50a05453b48b4ed8a0",
"transactionHash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"logs": [
{
"transactionIndex": 0,
"blockNumber": 14214,
"transactionHash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"address": "0xf0D4F76638b78cFB7d1CfFcFa2C8D9496f1B5DE4",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000e6b271930beff20a1e11644c37328dfee8cf3946",
"0x0000000000000000000000000000000000000000000000000000000000000030"
],
"data": "0x",
"logIndex": 0,
"blockHash": "0x1780dc06e4261fb4f57a19f6d668345e15ec31a7783c5b50a05453b48b4ed8a0"
},
{
"transactionIndex": 0,
"blockNumber": 14214,
"transactionHash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"address": "0x3DB8AdC77cc25791cE3860DFa3630c9116FA1A96",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000f85f715204ea343277bde713935ebf885083e5f5"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000000a5",
"logIndex": 1,
"blockHash": "0x1780dc06e4261fb4f57a19f6d668345e15ec31a7783c5b50a05453b48b4ed8a0"
},
{
"transactionIndex": 0,
"blockNumber": 14214,
"transactionHash": "0x7b8c3f3330da211b6a79b8d7f8b5dc7882db836da9745985b48ca6cec46f7567",
"address": "0x68c2046c5dA08B140A509afCbA6f4C715e807d28",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000f85f715204ea343277bde713935ebf885083e5f5"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000176",
"logIndex": 2,
"blockHash": "0x1780dc06e4261fb4f57a19f6d668345e15ec31a7783c5b50a05453b48b4ed8a0"
}
],
"blockNumber": 14214,
"confirmations": 1,
"cumulativeGasUsed": {
"type": "BigNumber",
"hex": "0x039699"
},
"effectiveGasPrice": {
"type": "BigNumber",
"hex": "0x3b9aca00"
},
"status": 1,
"type": 0,
"byzantium": true
},
"tokenId": "0x0000000000000000000000000000000000000000000000000000000000000030"
}
},
"hash": "0xcf1bc8e0a0686792e81fb1bc9d348bfed7f0f458d16aa7691f9ebcde2d3d531f"
}
},
"$schema": "https://schema.corrently.io/tydids/_all"
}
}
}
Beleg über Treibhausgas Emission und Minderung
Die digitale Belegführung erfolgt in Form eine JSON Datei, welche ein in sich valides und abgeschlossenes Dokument mit einem identitären Charakter ist. Der Beleg enthält alle im Zuge der Belegerstellung gesammelten Informationen, sowie die technischen Sicherheitsmerkmale zur Prüfung der Identität des Ausstellers und der unveränderten Darstellung der Daten. Der Besitzer der JSON Datei kann auf algorithmisch prüfbare Unterdokumente (Präsentationen) zugreifen, die durch Dritte, welche nicht den Beleg kennen, ebenfalls eine unabhängige Validierung ermöglichen.
Die JSON Dokumente dienen lediglich zur Struktur und Semantik der Darstellung eines Beleges. Der Beleg selbst - das JSON Dokument - kann als Nutzlast in ein JWT oder eine AS4 Nachricht eingebunden sein.
JSON Schema - Beleg Treibhausgas Emission und Minderung
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description":"Greenhouse Gas Emission and Savings proof",
"properties": {
"hash": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "digital signature of payload property given by issuer"
},
"payload": {
"type": "string"
}
},
"required": [
"signature",
"payload"
]
},
"owner": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "digital signature of payload property given by issuer"
},
"payload": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"issuer": {
"type": "string"
},
"hash": {
"type": "string"
}
},
"required": [
"owner",
"issuer",
"hash"
]
}
},
"required": [
"signature",
"payload"
]
},
"context": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "digital signature of payload property given by issuer"
},
"payload": {
"type": "object",
"properties": {
"usage": {
"type": "string"
},
"hash": {
"type": "string"
}
},
"required": [
"usage",
"hash"
]
}
},
"required": [
"signature",
"payload"
]
},
"did": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "digital signature of payload property given by issuer"
},
"payload": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"registry": {
"type": "string"
},
"uid": {
"type": "string"
},
"schema": {
"type": "string"
},
"method": {
"type": "string"
},
"ghgtoken": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"certificates": {
"type": "string"
},
"savings": {
"type": "string"
},
"emissions": {
"type": "string"
}
},
"required": [
"address",
"certificates",
"savings",
"emissions"
]
},
"nft": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "digital signature of payload property given by issuer"
},
"payload": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"tx": {
"type": "object",
"properties": {
"nonce": {
"type": "integer"
},
"gasPrice": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"gasLimit": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"to": {
"type": "string"
},
"value": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"data": {
"type": "string"
},
"chainId": {
"type": "integer"
},
"v": {
"type": "integer"
},
"r": {
"type": "string"
},
"s": {
"type": "string"
},
"from": {
"type": "string"
},
"hash": {
"type": "string"
},
"type": {
"type": "null"
},
"confirmations": {
"type": "integer"
}
},
"required": [
"nonce",
"gasPrice",
"gasLimit",
"to",
"value",
"data",
"chainId",
"v",
"r",
"s",
"from",
"hash",
"type",
"confirmations"
]
},
"receipt": {
"type": "object",
"properties": {
"to": {
"type": "string"
},
"from": {
"type": "string"
},
"contractAddress": {
"type": "null"
},
"transactionIndex": {
"type": "integer"
},
"gasUsed": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"logsBloom": {
"type": "string"
},
"blockHash": {
"type": "string"
},
"transactionHash": {
"type": "string"
},
"logs": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"transactionIndex": {
"type": "integer"
},
"blockNumber": {
"type": "integer"
},
"transactionHash": {
"type": "string"
},
"address": {
"type": "string"
},
"topics": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
},
{
"type": "string"
},
{
"type": "string"
}
]
},
"data": {
"type": "string"
},
"logIndex": {
"type": "integer"
},
"blockHash": {
"type": "string"
}
},
"required": [
"transactionIndex",
"blockNumber",
"transactionHash",
"address",
"topics",
"data",
"logIndex",
"blockHash"
]
},
{
"type": "object",
"properties": {
"transactionIndex": {
"type": "integer"
},
"blockNumber": {
"type": "integer"
},
"transactionHash": {
"type": "string"
},
"address": {
"type": "string"
},
"topics": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
},
{
"type": "string"
}
]
},
"data": {
"type": "string"
},
"logIndex": {
"type": "integer"
},
"blockHash": {
"type": "string"
}
},
"required": [
"transactionIndex",
"blockNumber",
"transactionHash",
"address",
"topics",
"data",
"logIndex",
"blockHash"
]
},
{
"type": "object",
"properties": {
"transactionIndex": {
"type": "integer"
},
"blockNumber": {
"type": "integer"
},
"transactionHash": {
"type": "string"
},
"address": {
"type": "string"
},
"topics": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
},
{
"type": "string"
}
]
},
"data": {
"type": "string"
},
"logIndex": {
"type": "integer"
},
"blockHash": {
"type": "string"
}
},
"required": [
"transactionIndex",
"blockNumber",
"transactionHash",
"address",
"topics",
"data",
"logIndex",
"blockHash"
]
}
]
},
"blockNumber": {
"type": "integer"
},
"confirmations": {
"type": "integer"
},
"cumulativeGasUsed": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"effectiveGasPrice": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"status": {
"type": "integer"
},
"type": {
"type": "integer"
},
"byzantium": {
"type": "boolean"
}
},
"required": [
"to",
"from",
"contractAddress",
"transactionIndex",
"gasUsed",
"logsBloom",
"blockHash",
"transactionHash",
"logs",
"blockNumber",
"confirmations",
"cumulativeGasUsed",
"effectiveGasPrice",
"status",
"type",
"byzantium"
]
},
"tokenId": {
"type": "string"
}
},
"required": [
"address",
"tx",
"receipt",
"tokenId"
]
}
},
"required": [
"signature",
"payload"
]
},
"hash": {
"type": "string"
}
},
"required": [
"url",
"registry",
"uid",
"schema",
"method",
"ghgtoken",
"nft",
"hash"
]
}
},
"required": [
"signature",
"payload"
]
},
"presentations": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "digital signature of payload property given by issuer"
},
"payload": {
"type": "string"
},
"$schema": {
"type": "string"
}
},
"required": [
"signature",
"payload",
"$schema"
]
},
"context": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "digital signature of payload property given by issuer"
},
"payload": {
"type": "object",
"properties": {
"usage": {
"type": "string"
},
"hash": {
"type": "string"
}
},
"required": [
"usage",
"hash"
]
},
"$schema": {
"type": "string"
}
},
"required": [
"signature",
"payload",
"$schema"
]
},
"location": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "digital signature of payload property given by issuer"
},
"payload": {
"type": "object",
"properties": {
"zip": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"meloid": {
"type": "string"
},
"hash": {
"type": "string"
}
},
"required": [
"zip",
"city",
"country",
"meloid",
"hash"
]
},
"$schema": {
"type": "string"
}
},
"required": [
"signature",
"payload",
"$schema"
]
},
"consumption": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "digital signature of payload property given by issuer"
},
"payload": {
"type": "object",
"properties": {
"unit": {
"type": "string"
},
"actual": {
"type": "integer"
},
"time": {
"type": "integer"
},
"hash": {
"type": "string"
}
},
"required": [
"unit",
"actual",
"time",
"hash"
]
},
"$schema": {
"type": "string"
}
},
"required": [
"signature",
"payload",
"$schema"
]
},
"ghg": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "digital signature of payload property given by issuer"
},
"payload": {
"type": "object",
"properties": {
"factors": {
"type": "object",
"properties": {
"unit": {
"type": "string"
},
"actual": {
"type": "object",
"properties": {
"grid": {
"type": "number"
},
"eco": {
"type": "number"
}
},
"required": [
"grid",
"eco"
]
},
"base": {
"type": "object",
"properties": {
"grid": {
"type": "number"
}
},
"required": [
"grid"
]
}
},
"required": [
"unit",
"actual",
"base"
]
},
"base": {
"type": "object",
"properties": {
"unit": {
"type": "string"
},
"grid": {
"type": "integer"
}
},
"required": [
"unit",
"grid"
]
},
"actual": {
"type": "object",
"properties": {
"unit": {
"type": "string"
},
"grid": {
"type": "integer"
},
"eco": {
"type": "integer"
}
},
"required": [
"unit",
"grid",
"eco"
]
},
"saving": {
"type": "object",
"properties": {
"unit": {
"type": "string"
},
"grid": {
"type": "integer"
}
},
"required": [
"unit",
"grid"
]
},
"scope": {
"type": "integer"
},
"hash": {
"type": "string"
}
},
"required": [
"factors",
"base",
"actual",
"saving",
"scope",
"hash"
]
},
"$schema": {
"type": "string"
}
},
"required": [
"signature",
"payload",
"$schema"
]
},
"did": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "digital signature of payload property given by issuer"
},
"payload": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"registry": {
"type": "string"
},
"uid": {
"type": "string"
},
"schema": {
"type": "string"
},
"method": {
"type": "string"
},
"ghgtoken": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"certificates": {
"type": "string"
},
"savings": {
"type": "string"
},
"emissions": {
"type": "string"
}
},
"required": [
"address",
"certificates",
"savings",
"emissions"
]
},
"nft": {
"type": "object",
"properties": {
"signature": {
"type": "string"
},
"payload": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"tx": {
"type": "object",
"properties": {
"nonce": {
"type": "integer"
},
"gasPrice": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"gasLimit": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"to": {
"type": "string"
},
"value": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"data": {
"type": "string"
},
"chainId": {
"type": "integer"
},
"v": {
"type": "integer"
},
"r": {
"type": "string"
},
"s": {
"type": "string"
},
"from": {
"type": "string"
},
"hash": {
"type": "string"
},
"type": {
"type": "null"
},
"confirmations": {
"type": "integer"
}
},
"required": [
"nonce",
"gasPrice",
"gasLimit",
"to",
"value",
"data",
"chainId",
"v",
"r",
"s",
"from",
"hash",
"type",
"confirmations"
]
},
"receipt": {
"type": "object",
"properties": {
"to": {
"type": "string"
},
"from": {
"type": "string"
},
"contractAddress": {
"type": "null"
},
"transactionIndex": {
"type": "integer"
},
"gasUsed": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"logsBloom": {
"type": "string"
},
"blockHash": {
"type": "string"
},
"transactionHash": {
"type": "string"
},
"logs": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"transactionIndex": {
"type": "integer"
},
"blockNumber": {
"type": "integer"
},
"transactionHash": {
"type": "string"
},
"address": {
"type": "string"
},
"topics": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
},
{
"type": "string"
},
{
"type": "string"
}
]
},
"data": {
"type": "string"
},
"logIndex": {
"type": "integer"
},
"blockHash": {
"type": "string"
}
},
"required": [
"transactionIndex",
"blockNumber",
"transactionHash",
"address",
"topics",
"data",
"logIndex",
"blockHash"
]
},
{
"type": "object",
"properties": {
"transactionIndex": {
"type": "integer"
},
"blockNumber": {
"type": "integer"
},
"transactionHash": {
"type": "string"
},
"address": {
"type": "string"
},
"topics": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
},
{
"type": "string"
}
]
},
"data": {
"type": "string"
},
"logIndex": {
"type": "integer"
},
"blockHash": {
"type": "string"
}
},
"required": [
"transactionIndex",
"blockNumber",
"transactionHash",
"address",
"topics",
"data",
"logIndex",
"blockHash"
]
},
{
"type": "object",
"properties": {
"transactionIndex": {
"type": "integer"
},
"blockNumber": {
"type": "integer"
},
"transactionHash": {
"type": "string"
},
"address": {
"type": "string"
},
"topics": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
},
{
"type": "string"
}
]
},
"data": {
"type": "string"
},
"logIndex": {
"type": "integer"
},
"blockHash": {
"type": "string"
}
},
"required": [
"transactionIndex",
"blockNumber",
"transactionHash",
"address",
"topics",
"data",
"logIndex",
"blockHash"
]
}
]
},
"blockNumber": {
"type": "integer"
},
"confirmations": {
"type": "integer"
},
"cumulativeGasUsed": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"effectiveGasPrice": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"status": {
"type": "integer"
},
"type": {
"type": "integer"
},
"byzantium": {
"type": "boolean"
}
},
"required": [
"to",
"from",
"contractAddress",
"transactionIndex",
"gasUsed",
"logsBloom",
"blockHash",
"transactionHash",
"logs",
"blockNumber",
"confirmations",
"cumulativeGasUsed",
"effectiveGasPrice",
"status",
"type",
"byzantium"
]
},
"tokenId": {
"type": "string"
}
},
"required": [
"address",
"tx",
"receipt",
"tokenId"
]
}
},
"required": [
"signature",
"payload"
]
},
"hash": {
"type": "string"
}
},
"required": [
"url",
"registry",
"uid",
"schema",
"method",
"ghgtoken",
"nft",
"hash"
]
},
"$schema": {
"type": "string"
}
},
"required": [
"signature",
"payload",
"$schema"
]
},
"_all": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "digital signature of payload property given by issuer"
},
"payload": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"context": {
"type": "object",
"properties": {
"usage": {
"type": "string"
},
"hash": {
"type": "string"
}
},
"required": [
"usage",
"hash"
]
},
"location": {
"type": "object",
"properties": {
"zip": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"meloid": {
"type": "string"
},
"hash": {
"type": "string"
}
},
"required": [
"zip",
"city",
"country",
"meloid",
"hash"
]
},
"consumption": {
"type": "object",
"properties": {
"unit": {
"type": "string"
},
"actual": {
"type": "integer"
},
"time": {
"type": "integer"
},
"hash": {
"type": "string"
}
},
"required": [
"unit",
"actual",
"time",
"hash"
]
},
"ghg": {
"type": "object",
"properties": {
"factors": {
"type": "object",
"properties": {
"unit": {
"type": "string"
},
"actual": {
"type": "object",
"properties": {
"grid": {
"type": "number"
},
"eco": {
"type": "number"
}
},
"required": [
"grid",
"eco"
]
},
"base": {
"type": "object",
"properties": {
"grid": {
"type": "number"
}
},
"required": [
"grid"
]
}
},
"required": [
"unit",
"actual",
"base"
]
},
"base": {
"type": "object",
"properties": {
"unit": {
"type": "string"
},
"grid": {
"type": "integer"
}
},
"required": [
"unit",
"grid"
]
},
"actual": {
"type": "object",
"properties": {
"unit": {
"type": "string"
},
"grid": {
"type": "integer"
},
"eco": {
"type": "integer"
}
},
"required": [
"unit",
"grid",
"eco"
]
},
"saving": {
"type": "object",
"properties": {
"unit": {
"type": "string"
},
"grid": {
"type": "integer"
}
},
"required": [
"unit",
"grid"
]
},
"scope": {
"type": "integer"
},
"hash": {
"type": "string"
}
},
"required": [
"factors",
"base",
"actual",
"saving",
"scope",
"hash"
]
},
"_iat": {
"type": "integer"
},
"_iss": {
"type": "string"
},
"_jti": {
"type": "string"
},
"did": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"registry": {
"type": "string"
},
"uid": {
"type": "string"
},
"schema": {
"type": "string"
},
"method": {
"type": "string"
},
"ghgtoken": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"certificates": {
"type": "string"
},
"savings": {
"type": "string"
},
"emissions": {
"type": "string"
}
},
"required": [
"address",
"certificates",
"savings",
"emissions"
]
},
"nft": {
"type": "object",
"properties": {
"signature": {
"type": "string"
},
"payload": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"tx": {
"type": "object",
"properties": {
"nonce": {
"type": "integer"
},
"gasPrice": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"gasLimit": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"to": {
"type": "string"
},
"value": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"data": {
"type": "string"
},
"chainId": {
"type": "integer"
},
"v": {
"type": "integer"
},
"r": {
"type": "string"
},
"s": {
"type": "string"
},
"from": {
"type": "string"
},
"hash": {
"type": "string"
},
"type": {
"type": "null"
},
"confirmations": {
"type": "integer"
}
},
"required": [
"nonce",
"gasPrice",
"gasLimit",
"to",
"value",
"data",
"chainId",
"v",
"r",
"s",
"from",
"hash",
"type",
"confirmations"
]
},
"receipt": {
"type": "object",
"properties": {
"to": {
"type": "string"
},
"from": {
"type": "string"
},
"contractAddress": {
"type": "null"
},
"transactionIndex": {
"type": "integer"
},
"gasUsed": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"logsBloom": {
"type": "string"
},
"blockHash": {
"type": "string"
},
"transactionHash": {
"type": "string"
},
"logs": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"transactionIndex": {
"type": "integer"
},
"blockNumber": {
"type": "integer"
},
"transactionHash": {
"type": "string"
},
"address": {
"type": "string"
},
"topics": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
},
{
"type": "string"
},
{
"type": "string"
}
]
},
"data": {
"type": "string"
},
"logIndex": {
"type": "integer"
},
"blockHash": {
"type": "string"
}
},
"required": [
"transactionIndex",
"blockNumber",
"transactionHash",
"address",
"topics",
"data",
"logIndex",
"blockHash"
]
},
{
"type": "object",
"properties": {
"transactionIndex": {
"type": "integer"
},
"blockNumber": {
"type": "integer"
},
"transactionHash": {
"type": "string"
},
"address": {
"type": "string"
},
"topics": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
},
{
"type": "string"
}
]
},
"data": {
"type": "string"
},
"logIndex": {
"type": "integer"
},
"blockHash": {
"type": "string"
}
},
"required": [
"transactionIndex",
"blockNumber",
"transactionHash",
"address",
"topics",
"data",
"logIndex",
"blockHash"
]
},
{
"type": "object",
"properties": {
"transactionIndex": {
"type": "integer"
},
"blockNumber": {
"type": "integer"
},
"transactionHash": {
"type": "string"
},
"address": {
"type": "string"
},
"topics": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
},
{
"type": "string"
}
]
},
"data": {
"type": "string"
},
"logIndex": {
"type": "integer"
},
"blockHash": {
"type": "string"
}
},
"required": [
"transactionIndex",
"blockNumber",
"transactionHash",
"address",
"topics",
"data",
"logIndex",
"blockHash"
]
}
]
},
"blockNumber": {
"type": "integer"
},
"confirmations": {
"type": "integer"
},
"cumulativeGasUsed": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"effectiveGasPrice": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"type",
"hex"
]
},
"status": {
"type": "integer"
},
"type": {
"type": "integer"
},
"byzantium": {
"type": "boolean"
}
},
"required": [
"to",
"from",
"contractAddress",
"transactionIndex",
"gasUsed",
"logsBloom",
"blockHash",
"transactionHash",
"logs",
"blockNumber",
"confirmations",
"cumulativeGasUsed",
"effectiveGasPrice",
"status",
"type",
"byzantium"
]
},
"tokenId": {
"type": "string"
}
},
"required": [
"address",
"tx",
"receipt",
"tokenId"
]
}
},
"required": [
"signature",
"payload"
]
},
"hash": {
"type": "string"
}
},
"required": [
"url",
"registry",
"uid",
"schema",
"method",
"ghgtoken",
"nft",
"hash"
]
}
},
"required": [
"type",
"context",
"location",
"consumption",
"ghg",
"_iat",
"_iss",
"_jti",
"did"
]
},
"$schema": {
"type": "string"
}
},
"required": [
"signature",
"payload",
"$schema"
]
}
},
"required": [
"type",
"context",
"location",
"consumption",
"ghg",
"did",
"_all"
]
}
},
"required": [
"hash",
"owner",
"context",
"did",
"presentations"
]
}
(Aktuelle Fassung des JSON-Schemas auf GitHub)
Beispiel Beleg: certificate.sample.json
Grundlegende Struktur
Die einzelnen Elemente des Beleges enthalten jeweils das Attribut payload
und signature
. Die eigentlichen Nutzdaten des Unterobjektes sind in payload
vorhanden und können entweder ein String oder ein Objekt sein. Die Signatur ist eine digitale Unterschrift, welche mithilfe eines Hashings über die gesamten Nutzdaten generiert wurde.
Die Signatur wird erstellt mit der Funktion wallet.tydids.
signMessage(payload)
(Implementierung) und überprüft mit der Funktion wallet.tydids.verifyMessage(payload,signature)
(Implementierung). Die Funktion verifyMessage
hat als Rückgabe eine Identitätskennung, des Unterschreibers (JSON Pfad: owner.payload.issuer
).
Elemente des Beleges
Hash
Owner
Context
DID
Presentations
tydidsValidation
Introduction
In the world of Ethereum blockchain transactions, it's important to verify the identity of the person signing the transactions. To meet Know Your Customer (KYC) requirements, we need a way to prove that the person behind an Ethereum account is who they claim to be. Our service provides a solution by allowing individuals to use their eID card to sign their Ethereum account, creating a verified link between their identity and their blockchain transactions. This ensures that third parties can trust the identity of the account holder, even when interacting through smart contracts on the Ethereum network.
Use Case: John the Freelancer
John is a freelance developer who often engages in projects with various companies. Recently, he started working with Acme Corp., a company that specializes in creating decentralized applications on the Ethereum blockchain. As part of his contract, John needs to sign a smart contract to receive his payments and other project-related transactions.
Acme Corp. has strict KYC requirements to ensure the authenticity of their collaborators. To meet these requirements, John uses Tydids that allows him to link his real-world identity to his Ethereum account using his eID card.
-
Setup and Verification:
- John logs into Tydids and uses his eID card to digitally sign his Ethereum account. This process securely binds his verified personal identity to his Ethereum address.
- The service generates a digital certificate that confirms John's identity and associates it with his Ethereum account.
-
Signing the Smart Contract:
- John accesses the smart contract provided by Acme Corp. through their decentralized application.
- Before signing the contract, the application prompts John to prove his identity using the digital certificate generated by the Tydids service.
- John selects his verified Ethereum account and uses his eID card to sign the transaction. This action confirms his identity to Acme Corp.
-
Transaction Execution:
- The smart contract on the Ethereum blockchain receives John’s signed transaction along with his identity verification.
- Acme Corp.’s smart contract validates the digital certificate and confirms that the transaction is indeed from John.
- Once verified, the smart contract executes the transaction, ensuring John receives his payment and any other agreed-upon benefits.
-
Trust and Security:
- Acme Corp. is assured that the person signing the transaction is truly John, fulfilling their KYC requirements.
- John can now seamlessly continue his work with Acme Corp., knowing his identity is securely verified on the blockchain.
By using this Tydids verification service, John and Acme Corp. can engage in secure, trusted transactions on the Ethereum blockchain, enabling efficient collaboration and compliance with KYC regulations.
Use Case: Alice sells CO2 savings
Alice is an environmentally conscious homeowner who has installed a rooftop solar PV system to generate electricity. By doing so, she reduces CO2 emissions, contributing to a cleaner environment. Alice has accumulated significant CO2 savings and wants to sell these savings to Acme Corp., a company with a Corporate Social Responsibility (CSR) directive to lower its Scope 2 emissions.
To facilitate this transaction and ensure that Acme Corp. remains audit-safe and compliant, a smart contract on one of the Ethereum based blockchain is used. This contract handles the "deal" between Alice and Acme Corp., ensuring transparency and anonymity while providing the necessary validation for Acme Corp.'s audits.
-
Generating CO2 Savings:
- Alice’s rooftop solar PV system continuously generates electricity, reducing her reliance on grid power and saving CO2 emissions.
- The total CO2 savings are recorded and verified through a trusted environmental monitoring service, which provides a digital certificate of the savings.
-
Setting Up the Smart Contract:
- Acme Corp. posts an offer on an Ethereum blockchain to buy verified CO2 savings to meet their CSR goals.
- Alice sees the offer and decides to sell her verified CO2 savings to Acme Corp.
- Both Alice and Acme Corp. agree to the terms of the deal through a smart contract. The contract specifies the amount of CO2 savings, the price, and the verification requirements.
-
Identity Verification:
- To ensure compliance and audit readiness, Alice uses her eID card to sign her Ethereum account. This verifies her identity without revealing it publicly on the blockchain.
- Acme Corp. also uses its verified Ethereum account to sign the smart contract, ensuring both parties are authenticated without exposing their identities.
-
Executing the Transaction:
- The smart contract on the Ethereum blockchain executes the deal once Alice’s CO2 savings are verified.
- The digital certificate proving Alice’s CO2 savings is linked to the transaction, ensuring that Acme Corp. can later prove the source of their CO2 reductions.
- The agreed-upon payment is transferred from Acme Corp.’s Ethereum account to Alice’s Ethereum account.
-
Transparency and Anonymity:
- The transaction details, such as the amount of CO2 savings and the payment, are recorded on the Ethereum blockchain, ensuring transparency.
- However, the actual identities of Alice and Acme Corp. remain anonymous to the public. Only Alice and Acme Corp. know each other's real-world identities.
-
Audit and Compliance:
- Acme Corp. can now use the verified CO2 savings to report lower Scope 2 emissions, fulfilling their CSR requirements.
- During an audit, Acme Corp. can present two key documents to streamline the process:
- The blockchain transaction record, which details the CO2 savings transaction.
- A PDF document proving Alice's identity, linked to the digital certificate used in the transaction.
- This simplified documentation makes the audit process more efficient, ensuring compliance with minimal paperwork.
By using this system, Alice can monetize her environmental contributions, and Acme Corp. can meet their emission reduction targets in a transparent, anonymous, and compliant manner, with streamlined audit processes.
Use Case: KYC Validation on an existing customer base
Acme Corp. is a global company with a diverse customer base. To comply with international regulations, Acme Corp. needs to ensure the strong eValidation of all their customers. Currently, every customer is assigned a unique customer number, but this alone is not sufficient for compliance.
To address this, Acme Corp. implements a new process to validate customer identities securely and efficiently.
-
Customer Onboarding:
- Acme Corp. informs its customers about the new identity validation process.
- Each customer is given a unique URL to initiate their eValidation. The URL contains the customer’s unique number, ensuring that the validation process is linked to the correct account.
-
Initiating eValidation:
- When a customer logs into their account on Acme Corp.’s website, the system automatically generates and displays a personalized eValidation link.
- For example, for a customer with the number 1337, the URL would be automatically generated as:
https://tydids.com/?return_to=https%3A%2F%2Facme.com%2Fvalidation%3FcustomerID%3D1337&key_1=customerID&value_1=1337
. - The customer simply needs to click on the provided URL without needing to manually replace any part of it.
-
Validation Process:
- The customer clicks on the provided URL and is redirected to the eValidation service of tydids.
- At
tydids.com
, the customer undergoes an identity verification process, in form of a eID verification and signing.
-
Completion of eValidation:
- Once the eValidation process is completed successfully, the customer is redirected back to Acme Corp.'s validation endpoint.
- The URL for the redirection will look like this:
https://acme.com/validation?customerID=1337&validationID=abc123
, whereabc123
is the unique validation ID generated during the eValidation process.
-
Processing the Validation at Acme Corp.:
- Acme Corp.’s system receives the validation ID along with the customer ID.
- Acme Corp. uses the validation ID to retrieve the validation results from
tydids.com
, ensuring that the customer’s identity has been verified. - The customer’s account is then updated to reflect the successful validation, ensuring compliance with regulatory requirements.
-
Benefits and Compliance:
- This process ensures that Acme Corp. has a robust and reliable method for verifying the identities of its global customer base.
- The use of a unique customer number and validation ID ensures that the process is secure and that each customer’s identity is accurately verified.
- During an audit, Acme Corp. can present the verifications to streamline the process:
- A PDF document proving the customer’s identity, linked to the digital certificate used in the transaction.
- This simplified documentation makes the audit process more efficient, ensuring compliance with minimal paperwork.
By implementing this eValidation process, Acme Corp. can efficiently and securely verify the identities of their worldwide customers, meeting compliance requirements and enhancing trust in their customer database.