From 5f78d1e88ff45ed542d80a918495d6bf4d95f1cc Mon Sep 17 00:00:00 2001 From: Alberto Lerda Date: Tue, 29 Aug 2023 17:38:10 +0200 Subject: [PATCH] chore: move docs --- README.md | 60 +++++++++++++++++++ docs/README.md | 60 ------------------- {docs/use-cases => use-cases}/dao-oracle.md | 0 .../use-cases => use-cases}/did-resolution.md | 0 4 files changed, 60 insertions(+), 60 deletions(-) delete mode 100644 docs/README.md rename {docs/use-cases => use-cases}/dao-oracle.md (100%) rename {docs/use-cases => use-cases}/did-resolution.md (100%) diff --git a/README.md b/README.md index fbd3605..2655ddb 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,66 @@ make run ORACLE_TYPE=common At this point, the node owner can submit the signature of its address to the Smart Contract +## 📝 Flows + +### Announce flow + +```mermaid +sequenceDiagram +autonumber + participant A as Oracle Owner + participant D as Distributor/Restroom-mw.DID_Admin + participant I as did.dyne.org + rect rgb(191, 223, 255) + note left of A: `make keygen` + A->A: Keygen + end + rect rgb(191, 223, 255) + note left of A: `make announce` + A->A: Create DID Document + A->>D: Request to sign DID-Document + D->D: Verifies signature(s) of DID-Document + D->D: Sign sign DID-Document + D->>I: Request register Oracle DID-Document + I->>D: Return registered DID-Document + D->D: (If Distributor) store DID-Document in DB + D->>A: Return DID-Document signed + A->A: Stores signed and registered DID-Document on file system + end +``` + +1. Oracle owner generates a private and public keys (SKs + PKs) via `make keygen` +1. Oracle owner creates DID-Document with PKs via `make announce` +1. Oracle owner request DID-Document signature and registration +1. Distributor/Restroom-mw.DID_Admin verifie signature(s) of DID-Document +1. Distributor/Restroom-mw.DID_Admin signs DID-Document using DID.domain.context_A sk +1. Distributor/Restroom-mw.DID_Admin request did.dyne.org to registers DID-Document +1. did.dyne.org returns registered DID-Document +1. (If Distributor is acting) stores DID-Document on DB +1. Distributor/Restroom-mw.DID_Admin returns DID-Document to Oracle Owner +1. Oracle owner stores signed and registered DID-Document on file system + +### Goodbye flow + +```mermaid +sequenceDiagram +autonumber + participant A as Oracle Owner + participant I as did.dyne.org + rect rgb(191, 223, 255) + note left of A: `make goodbye` + A->A: Create DID deactivation request + A->>I: Request deactivation + I->I: Deactivate DID-Document + I->>A: Return deactivated DID-Document + end +``` +### Distributor or Restroom mw Admin? +A DID Document has to be signed by an admin. +It is simple to setup a restroom instance which offers a contract to sign DID Document, it just need a DID Admin secret key. + +One can also make an oracle offer the contract to sign DID Document, this kind of oracle is known as "Distributor". +One may decide to use a Distributor, instead of a simple restroom instance if he wants more features, e.g. being able to listen to websockets. ## 😍 Acknowledgements diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 1381ee7..0000000 --- a/docs/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# Flows - -## Announce flow - -```mermaid -sequenceDiagram -autonumber - participant A as Oracle Owner - participant D as Distributor/Restroom-mw.DID_Admin - participant I as did.dyne.org - rect rgb(191, 223, 255) - note left of A: `make keygen` - A->A: Keygen - end - rect rgb(191, 223, 255) - note left of A: `make announce` - A->A: Create DID Document - A->>D: Request to sign DID-Document - D->D: Verifies signature(s) of DID-Document - D->D: Sign sign DID-Document - D->>I: Request register Oracle DID-Document - I->>D: Return registered DID-Document - D->D: (If Distributor) store DID-Document in DB - D->>A: Return DID-Document signed - A->A: Stores signed and registered DID-Document on file system - end -``` - -1. Oracle owner generates a private and public keys (SKs + PKs) via `make keygen` -1. Oracle owner creates DID-Document with PKs via `make announce` -1. Oracle owner request DID-Document signature and registration -1. Distributor/Restroom-mw.DID_Admin verifie signature(s) of DID-Document -1. Distributor/Restroom-mw.DID_Admin signs DID-Document using DID.domain.context_A sk -1. Distributor/Restroom-mw.DID_Admin request did.dyne.org to registers DID-Document -1. did.dyne.org returns registered DID-Document -1. (If Distributor is acting) stores DID-Document on DB -1. Distributor/Restroom-mw.DID_Admin returns DID-Document to Oracle Owner -1. Oracle owner stores signed and registered DID-Document on file system - -## Goodbye flow - -```mermaid -sequenceDiagram -autonumber - participant A as Oracle Owner - participant I as did.dyne.org - rect rgb(191, 223, 255) - note left of A: `make goodbye` - A->A: Create DID deactivation request - A->>I: Request deactivation - I->I: Deactivate DID-Document - I->>A: Return deactivated DID-Document - end -``` -## Distributor or Restroom mw Admin? -A DID Document has to be signed by an admin. -It is simple to setup a restroom instance which offers a contract to sign DID Document, it just need a DID Admin secret key. - -One can also make an oracle offer the contract to sign DID Document, this kind of oracle is known as "Distributor". -One may decide to use a Distributor, instead of a simple restroom instance if he wants more features, e.g. being able to listen to websockets. diff --git a/docs/use-cases/dao-oracle.md b/use-cases/dao-oracle.md similarity index 100% rename from docs/use-cases/dao-oracle.md rename to use-cases/dao-oracle.md diff --git a/docs/use-cases/did-resolution.md b/use-cases/did-resolution.md similarity index 100% rename from docs/use-cases/did-resolution.md rename to use-cases/did-resolution.md