# Demo 0.5 **Zielsetzung:** adaptiere [Use Case #0](https://hackmd.io/rrpChr57TlWwE3qliuzpwg?view), sodass die Funktionalität für Stakeholder in Österreich möglichst effizient und verständlich präsentiert werden kann ### Beschreibung Diese Demo beschreibt die Erstellung einer digitalen EPD (Umweltproduktdeklaration) in Form eines DPP (Digitaler Produkt Pass). Sie umfasst die folgenden technischen Komponenten: <details><summary><strong>Privater Datenspeicher</strong> des Betonherstellers: zum Speichern der privaten Daten (zB Rezeptur) und EPD-Erstellung</summary> URL: https://cp-private.data-container.net ```bash # Credentials APP_KEY: 5mdPuiwt-H50Ixl2rWRKVPKQMhfdYw5LngK6RwBwZ5c APP_SECRET: EFV6OgfmFj73XmAI-4ncU41MLjOACwvIU5jtlWXpFtA ``` Github Repo: https://github.com/OwnYourData/dc-cpprivate Docker Image: https://hub.docker.com/r/oydeu/cp-private </details> <details><summary><strong>Daten Intermediär</strong>: speichert Nachweise für den DPP</summary> URL: https://concrete.go-data.at ```bash # Credentials APP_KEY: nENk5CBuUIQy0e24bewN-WJx8w-FkPUekG9oQtx9N-4 APP_SECRET: 1oiPZTxbnQyQnl48QsRR9LlsAPFUUVTV5o4aaqZdOIg ``` Github Repo: https://github.com/OwnYourData/dc-intermediary Docker Image: https://hub.docker.com/r/oydeu/dc-intermediary </details> <details><summary><strong>EPD Tool</strong>: zur Berechnung des EPD und Zero-Knowledge Proof</summary> URL: https://epd.ownyourdata.eu Github Repo: https://github.com/OwnYourData/zk-epd-calc Docker Image: https://hub.docker.com/oydeu/zk-epd-calc </details> &nbsp; **Rollen und Identitäten** Beschreibung der Vertrauensbeziehungen: [Wikipedia](https://en.wikipedia.org/wiki/Verifiable_credentials#Trust_model) <details><summary><em>Betonproduzent (EPD Aussteller):</em> erfasst Daten und erstellt DPP</summary> <ul> <li>DID: <code>did:oyd:zQmaS7yYwARSEw3ZEzi5wyfiz78hiBCS9UFaxWstueXxvNU</code><br>(note: will differ based on DID in wallet)</li> <li>command: <code>echo '' | oydid create --doc-pwd cppwd --rev-pwd cprev -z 1</code></li> </ul> </details> <details><summary><em>Gebäude Eigentümer (Prüft Daten):</em> überprüft Inhalte des DPP</summary> <ul> <li>DID: <code>did:oyd:zQmYsEgetRcnZiAjdChXZcHnUD4YDgVPquEZpAE14Xq55Hh</code></li> <li>command: <code>echo '' | oydid create --doc-pwd cspwd --rev-pwd csrev -z 1</code></li> </ul> </details> <details><summary><em>Daten Intermediär (neutrale Instanz):</em> speichert DPP und gewährt authorisierten Zugriff</summary> <ul> <li>DID: <code>did:oyd:zQmSAxAeWkGDN1xm9eKWq547DTfdFYkgJGjpBs54Q5BqLx8</code></li> <li>command: <code>echo '' | oydid create --doc-pwd dipwd --rev-pwd direv -z 1</code></li> </ul> </details> &nbsp; **Daten Modelle** * [`ConcreteMixture`](https://soya.ownyourdata.eu/ConcreteMixture/yaml) - interner/geheimer Betonmix ([edit](https://soya-form.ownyourdata.eu/?schemaDri=ConcreteMixture&data=%7B%7D) | [Beispiel](https://soya-form.ownyourdata.eu/?schemaDri=ConcreteMixture&data=%7B%22description%22%3A%22C+25%2F30%2FB1%22%2C%22cement%22%3A15%2C%22gravel%22%3A20%2C%22water%22%3A25%2C%22additives%22%3A30%2C%22material%22%3A%22super+starker+Eco%2B%2B%22%2C%22factory%22%3A%22Eggendorf%22%7D)) * [`zkEPD`](https://soya.ownyourdata.eu/zkEPD/yaml) - Zero-Knowledge Proof für EPD ([edit](https://soya-form.ownyourdata.eu/?schemaDri=zkEPD) | [Beispiel](https://soya-form.ownyourdata.eu/?schemaDri=zkEPD&data=%7B%22description%22%3A%22C+25%2F30%2FB1%22%2C%22factory%22%3A%22Eggendorf%22%2C%22A13_gwp%22%3A165.4%2C%22zkp%22%3A%221234abcd%22%7D)) * [`ConcreteDPP`](https://soya.ownyourdata.eu/ConcreteDPP/yaml) - Digitaler Produkt Pass für eine Beton-Charge ([edit](https://soya-form.ownyourdata.eu/?schemaDri=ConcreteDPP) | [Beispiel](https://soya-form.ownyourdata.eu/?schemaDri=ConcreteDPP&data=%7B%22date%22%3A%222024-05-29%22%2C%22epd%22%3A%7B%22description%22%3A%22C+25%2F30%2FB1%22%2C%22factory%22%3A%22Eggendorf%22%2C%22A13_gwp%22%3A165.4%2C%22zkp%22%3A%221234abcd%22%7D%2C%22volume%22%3A1.5%7D)) ## Ablauf ### Sequenz-Diagramm ```plantuml @startuml box "Services des Beton Herstellers" #LightBlue actor "Beton\nHersteller" as cp participant "Online\nWallet" as wallet database "Privater\nDatenspeicher" as store participant "EPD\nBerechnung" as epd end box box " Daten\nIntermediär" database " " as disp box "Services des Gebäude\n Eigentümers" #LightGreen actor "Gebäude\nEigentümer" as owner participant "EPD\nVerifikation" as epdverify cp -> store: Betonmix eingeben cp --> store: starte EPD Berechnung store -> epd: sende Betonmix epd -> store: speichere EPD cp --> store: starte DPP Erstellung store -> store: erstelle DPP store -> wallet: signiere DPP wallet --> store store -> disp: speichere DPP store --> cp: stelle DID für DPP bereit cp --> owner: teile DID (DPP) owner --> disp: lese\nDPP owner -> epdverify: validiere DPP (mit\nZero-Knowledge\nProof) @enduml ``` ### Schrittweise Anleitung 1) Betonhersteller authentifiziert sich im Privaten Datenspeicher * URL: https://cp-private.data-container.net/ App Key: `5mdPuiwt-H50Ixl2rWRKVPKQMhfdYw5LngK6RwBwZ5c` App Secret: `EFV6OgfmFj73XmAI-4ncU41MLjOACwvIU5jtlWXpFtA` 2) Betonhersteller erstellt neuen Datensatz vom Typ `ConcreteMixture` * **Eingabe:** * Allgemein: Beschreibung, Material, Werk * Inhaltsstoffe: Zement, Schotter, Wasser, Zusatzstoffe (in M.%) * **Ergebnis:** neuer Datensatz Beispiel: https://cp-private.data-container.net/?itemId=95 3) Betonhersteller startet "Generate EPD" für "ConcreteMixture" Datensatz * **Startpunkt:** Datensatz vom Typ `ConcreteMixture`<br><br> * **Ergebnis:** neuer Datensatz vom Typ `zkEPD` Beispiel: https://cp-private.data-container.net/?itemId=96 * **Ergebnis:** neuer Datensatz vom Typ `ConcreteDPP` Beispiel: https://cp-private.data-container.net/?itemId=97 4) Betonhersteller startet "Generate DPP" für "ConcreteDPP" Datensatz * **Startpunkt:** Datensatz vom Typ `ConcreteDPP` * Eingabe in die Felder `Date` & `Volume` * klicke auf "Generate DPP" * **Ergebnis:** aktualisierter Datensatz vom Typ `ConcreteDPP` Beispiel: https://cp-private.data-container.net/?itemId=97 * DID: [`did:oyd:zQmQht8RJD6vx7nDvqjL8fdYPrTBJvDJui5oQVbW6cYJTw3`](https://dev.uniresolver.io/#did:oyd:zQmQht8RJD6vx7nDvqjL8fdYPrTBJvDJui5oQVbW6cYJTw3) * Verifiable Presentation: <br><span style="font-size:11px">[`https://concrete.go-data.at/presentations/zQmboVisouVKVfB1PduFgsGq4LCZWAY56x3ScXxMukgFdLs`](https://concrete.go-data.at/presentations/zQmboVisouVKVfB1PduFgsGq4LCZWAY56x3ScXxMukgFdLs)</span> 5) Eigentümer des Gebäudes verifiziert DPP * **Startpunkt:** Datensatz vom Typ `ConcreteDPP` Beispiel: https://cp-private.data-container.net/?itemId=97 * klicke auf "Verify DPP" * **Ergebnis:** Darstellung des Prüfergebnisses geprüft wird * Integrität des Nachweis (`oydid vp-verify`) * korrekte Berechnung des GWP mit Zero-Knowledge Proof