-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
111 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Web-to-Web P2P Demo | ||
|
||
This project demonstrates a peer-to-peer (P2P) communication between two web clients using TLSNotary. | ||
The web prover will get data from <https://swapi.dev> and prove it to the web verifier. | ||
|
||
In this demo, the two web clients run in the same browser page (`./src/app.tsx`) and communicate via a simple websocket server (`./server/index.js`) | ||
|
||
## Run the demo | ||
|
||
1. Run the demo: | ||
``` | ||
npm i | ||
npm run dev | ||
``` | ||
2. Open <http://localhost:3456/> | ||
3. Click the **Start Demo** button | ||
|
||
The Prover window logs the Prover's output, the Verifier logs the Verifier's output. In the console view you can see the websocket log. | ||
You can also open the Browser developer tools (F12) to see more TLSNotary protocol logs. | ||
|
||
## Project Structure | ||
|
||
- `src/`: Contains the source code for the demo. | ||
- `server/`: Contains the WebSocket server code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters