Skip to content

Commit

Permalink
update gun-eth readme with flowcharts
Browse files Browse the repository at this point in the history
  • Loading branch information
scobru committed Oct 18, 2024
1 parent dff6800 commit b61ca55
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 12 deletions.
43 changes: 31 additions & 12 deletions packages/gun-eth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@

## Table of Contents

1. [Description](#description)
2. [Smart Contract](#smart-contract)
3. [Key Features](#key-features)
4. [How to Install](#how-to-install)
5. [How to Use](#how-to-use)
6. [Core Functions](#core-functions)
7. [SHINE](#shine)
8. [Standalone Mode](#standalone-mode)
9. [Security Considerations](#security-considerations)
10. [Contributing](#contributing)
11. [License](#license)
12. [Contact](#contact)
1. [DESCRIPTION](#description)
2. [SMART CONTRACT](#smart-contract)
3. [KEY FEATURES](#key-features)
4. [HOW TO INSTALL](#how-to-install)
5. [HOW TO USE](#how-to-use)
6. [HOW IT WORKS](#how-it-works)
7. [CORE FUNCTIONS](#core-functions)
8. [SHINE](#shine)
9. [STANDALONE MODE](#standalone-mode)
10. [SECURITY CONSIDERATIONS](#security-considerations)
11. [CONTRIBUTING](#contributing)
12. [LICENSE](#license)
13. [CONTACT](#contact)

## DESCRIPTION

Expand Down Expand Up @@ -60,6 +61,19 @@ Learn more about Gun.js [here](https://gun.eco/docs/Getting-Started).

Learn more about plugin implementation [here](https://github.com/amark/gun/wiki/Adding-Methods-to-the-Gun-Chain#abstraction-layers).


## HOW IT WORKS

### Create KeyPair


[![](https://mermaid.ink/img/pako:eNpdUUtuwjAQvcrIGzZwgSwqJSRQhEorwqZNWLjxkFgkduSPEAJu1Fv0Yp0khaj1wh6P3s_jCyu0QBawQ61PRcWNg12cKxhWmK2T97dwtYVlskm24W71utnDbPYE0SWVpUIDJdLOHQIHSx3uvEE4SVdBJS2ceF2juz0Eo458Tb-_rjDPlnfqGs8tl2agpUm4f-DnvVmcJaow59aBq_6hR09vpSqh9OqvQtwrJGQ2sBU9F7TqgHEEEzpm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wuuEVf8gPx7LGLQlpNq2ZC60EdsJyrH607zP0f6c7pXw?type=png)](https://mermaid.live/edit#pako:eNplUsluwjAQ_ZWRz_ADObQCEiggOLAc2iQHN56ABbGjsU2FAv_erBBBLs7Yb5lnT8ESLZB5LD3rv-TIycLOjxSU3yjc7kabnQcbtCTxgrDEa84lxTAcfsC42BskyElfpEADXAhCU65KgJEHxa0j_Lw3WuOKcvtGc4NJ-NBDldA1tyjg1ChDSjqDmVP-OG6Ik9rLL4J3qHZKdPr-Uz8IfayxD6QzUh26RnvNtRZBbTEtWprUCoxLkjJL6s6dwfRpMKsCOFIg8KWnuI9d6xt8dVAk0uTBXvHfM4LVHTfut18x5i-M9spBadskjvsXWjEWL4yVNHXe7j00vSWe1YmXYbD2nw7Uvkrn8NWAmmLeLxZNwQYsQ8q4FOX4FNVRxOwRM4yYV_4KTqeI1dvqXmK5s3p7VQnzLDkcMNLucGReys-mrFwuuEVf8gPx7LGLQlpNq2ZC60EdsJyrH607zP0f6c7pXw)

## CORE FUNCTIONS

- `verifySignature(message, signature)`: Verifies an Ethereum signature for a given message.
Expand Down Expand Up @@ -114,6 +128,11 @@ Learn more about plugin implementation [here](https://github.com/amark/gun/wiki/

SHINE (Secure Hash Integrity Network Ethereum) provides a mechanism for verifying data integrity using Ethereum and Gun.js.


[![](https://mermaid.ink/img/pako:eNplk1GTmjAQx79KJs_oICAiD9epQoX25Dq1006LPqRkPTMHiRODdx763S8Ez7N3PCXZ__73txvS4EJQwCFel-Kx2BCp0M9oyZH-PucL1e4XSZrF6BdItmYFUUzwFer1btCkSfm2ViHi2iGln05d2qQNHv_A7oim-Q9QksEeECWKoLUUFZrVPJqsOu3UGEVNZKKi5heX6M0lzuMnJUmhUCG4Aq4SstusrmWZOKIvecxpiIwTF6pzO6tiU2aWmx4OHYvgPd0u42fJzEiSjmRPSkYvilek5A0pzWegUEkU7BSSUAhJu-b-laJ4uPZNLoBf3wHuzUDhlTE1AN-uRO8E19Nt_W41AwepGRCHx_MlnLW3xmyeTyW08Y9zmxtBpm9YSECM_3crmQne5b8l08mCf-zqzii-d7CZrm5GumvN6ApbuAJZEUb1b9W0CUusNlDBEod6SYl8WGJzzE9aS2olFgde4FDJGiwsRX2_weGalDu9q7faGiJG7iWpLqdbwnHY4Ccc9pxxf-wEA9exPc92A384tPABh8NB33WDwdCxfcfxAy84WfhZCG0x6HuuZ49HI98PRjpojywMlGn2efcSzIMwNf6ahBbr9AJRuPoz?type=png)](https://mermaid.live/edit#pako:eNplk1GTmjAQx79KJs_oICAiD9epQoX25Dq1006LPqRkPTMHiRODdx763S8Ez7N3PCXZ__73txvS4EJQwCFel-Kx2BCp0M9oyZH-PucL1e4XSZrF6BdItmYFUUzwFer1btCkSfm2ViHi2iGln05d2qQNHv_A7oim-Q9QksEeECWKoLUUFZrVPJqsOu3UGEVNZKKi5heX6M0lzuMnJUmhUCG4Aq4SstusrmWZOKIvecxpiIwTF6pzO6tiU2aWmx4OHYvgPd0u42fJzEiSjmRPSkYvilek5A0pzWegUEkU7BSSUAhJu-b-laJ4uPZNLoBf3wHuzUDhlTE1AN-uRO8E19Nt_W41AwepGRCHx_MlnLW3xmyeTyW08Y9zmxtBpm9YSECM_3crmQne5b8l08mCf-zqzii-d7CZrm5GumvN6ApbuAJZEUb1b9W0CUusNlDBEod6SYl8WGJzzE9aS2olFgde4FDJGiwsRX2_weGalDu9q7faGiJG7iWpLqdbwnHY4Ccc9pxxf-wEA9exPc92A384tPABh8NB33WDwdCxfcfxAy84WfhZCG0x6HuuZ49HI98PRjpojywMlGn2efcSzIMwNf6ahBbr9AJRuPoz)



#### SHINE Contract Configuration

Currently, SHINE supports only the Optimism Sepolia network. The contract address is managed internally:
Expand Down
103 changes: 103 additions & 0 deletions packages/svelte/src/routes/landing/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<script lang="ts">
import { Address } from "$lib/components/scaffold-eth";
import { createAccount } from "@byteatatime/wagmi-svelte";
import { Icon, DocumentCheck } from "svelte-hero-icons";
const { address } = $derived.by(createAccount());
import logo from "$lib/assets/logo.svg";
</script>

<div class="flex flex-grow flex-col items-center font-sans">
<div class="px-5">
<h1 class="text-center">
<span class="mb-2 block text-2xl">Benvenuto in</span>
<span class="block text-7xl font-semibold">Il Tuo Progetto</span>
<img src={logo} class="mx-auto h-56 w-56" />
</h1>
<div class="flex items-center justify-center space-x-2">
<p class="my-2 font-medium">Indirizzo Connesso:</p>
<Address {address} />
</div>
</div>

<div class="my-8 min-w-full bg-gradient-to-r from-purple-600 via-pink-500 to-red-500 py-8 text-center text-white">
<h2 class="mb-2 text-4xl font-bold">Live su Optimism Sepolia!</h2>
</div>

<div class="mt-16 w-full flex-grow px-8 py-12">
<div class="flex flex-col items-center justify-center gap-12 sm:flex-row">
<div class="flex max-w-xs flex-col items-center rounded-3xl px-10 py-10 text-center">
<img
src="https://camo.githubusercontent.com/e79cc2fa3e42c4007e7d23e3827768b233b019fef64edf9aeb591c02ca8f958a/68747470733a2f2f636c6475702e636f6d2f5445793979476834356c2e737667"
class="h-auto w-auto"
alt=""
/>
</div>
<div class="flex max-w-xs flex-col items-center rounded-3xl px-10 py-10 text-center">
<h2 class="text-5xl font-bold">➕</h2>
</div>
<div class="flex max-w-xs flex-col items-center rounded-3xl px-10 py-10 text-center">
<img src="https://scaffoldeth.io/logo.svg" alt="" class="h-auto w-auto" />
</div>
</div>
</div>
</div>

<div class="card-actions mt-6 justify-center rounded-lg">
<a
href="https://github.com/tuo-utente/tuo-progetto"
target="_blank"
rel="noopener noreferrer"
class="btn btn-primary btn-lg my-10 rounded-lg"
>
<Icon src={DocumentCheck} class="mr-2 h-6 w-6" />
Fork il Repo
</a>
</div>

<div class="card bg-ableton-light-blue mx-auto w-fit rounded-none text-black">
<div class="bg-ableton-yellow flex w-full p-10 text-black">
<div class="w-1/2 p-4">
<h2 class="mb-4 text-5xl font-semibold">Origine del Progetto e Documentazione</h2>
<p class="mb-4 text-xl">
Il tuo progetto è basato su Scaffold-ETH, un framework per lo sviluppo rapido di applicazioni decentralizzate (dApp) su Ethereum.
</p>
<p class="mb-4 text-xl">
Il progetto integra GunDB per la gestione decentralizzata dei dati e Wagmi per l'interazione con Ethereum.
</p>
</div>
<div class="w-1/2 p-4">
<h3 class="mb-4 text-3xl font-medium">Link Utili:</h3>
<ul class="list-disc space-y-2 pl-5 text-xl">
<li>
<a href="https://scaffoldeth.io" class="hover:underline" target="_blank" rel="noopener noreferrer">
Documentazione Scaffold-ETH
</a>
</li>
<li>
<a href="https://gun.eco/docs/" class="hover:underline" target="_blank" rel="noopener noreferrer">
Documentazione GunDB
</a>
</li>
<li>
<a href="https://wagmi.sh/" class="hover:underline" target="_blank" rel="noopener noreferrer">
Documentazione Wagmi
</a>
</li>
<li>
<a href="https://github.com/ByteAtATime/wagmi-svelte" class="hover:underline" target="_blank" rel="noopener noreferrer">
Wagmi Svelte
</a>
</li>
<li>
<a href="https://github.com/tuo-utente/tuo-progetto" class="hover:underline" target="_blank" rel="noopener noreferrer">
Repository GitHub del Tuo Progetto
</a>
</li>
</ul>
</div>
</div>
</div>

<style>
/* Aggiungi qui il tuo stile personalizzato */
</style>

0 comments on commit b61ca55

Please sign in to comment.