Skip to content

Commit 07f2645

Browse files
authored
chore: update examples to alpha.9 + improve readme (#102)
1 parent c70abc5 commit 07f2645

File tree

5 files changed

+28
-35
lines changed

5 files changed

+28
-35
lines changed

demo/interactive-demo/prover-rs/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ tracing-subscriber = { version ="0.3.18", features = ["env-filter"] }
2525
uuid = { version = "1.4.1", features = ["v4", "fast-rng"] }
2626
ws_stream_tungstenite = { version = "0.13", features = ["tokio_io"] }
2727

28-
tlsn-core = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.8", package = "tlsn-core" }
29-
tlsn-prover = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.8", package = "tlsn-prover" }
30-
tlsn-common = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.8", package = "tlsn-common" }
28+
tlsn-core = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.9", package = "tlsn-core" }
29+
tlsn-prover = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.9", package = "tlsn-prover" }
30+
tlsn-common = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.9", package = "tlsn-common" }

demo/interactive-demo/verifier-rs/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ tracing = "0.1.40"
3232
tracing-subscriber = { version ="0.3.18", features = ["env-filter"] }
3333
ws_stream_tungstenite = { version = "0.13", features = ["tokio_io"] }
3434

35-
tlsn-core = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.8", package = "tlsn-core" }
36-
tlsn-verifier = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.8", package = "tlsn-verifier" }
37-
tlsn-common = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.8", package = "tlsn-common" }
35+
tlsn-core = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.9", package = "tlsn-core" }
36+
tlsn-verifier = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.9", package = "tlsn-verifier" }
37+
tlsn-common = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.9", package = "tlsn-common" }
3838
tower-util = "0.3.1"

demo/react-ts-webpack/src/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ root.render(<App />);
2626
const local = true; // Toggle between local and remote notary
2727
const notaryUrl = local
2828
? 'http://localhost:7047'
29-
: 'https://notary.pse.dev/v0.1.0-alpha.8';
29+
: 'https://notary.pse.dev/v0.1.0-alpha.9';
3030
const websocketProxyUrl = local
3131
? 'ws://localhost:55688'
3232
: 'wss://notary.pse.dev/proxy?token=swapi.dev';

quickstart.md

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,31 @@ Note the `tcp:swapi.dev:443` argument on the last line, this is the server we wi
2929

3030
For this demo, we also need to run a local notary server.
3131

32-
1. Clone the TLSNotary repository:
33-
```shell
34-
git clone https://github.com/tlsnotary/tlsn.git --branch "v0.1.0-alpha.8"
35-
```
36-
2. Edit the notary server config file (`notary/server/config/config.yaml`) to turn off TLS so that the browser extension can connect to the local notary server without requiring extra steps to accept self-signed certificates in the browser.
37-
```yaml
38-
tls:
39-
enabled: false
40-
```
41-
3. Run the notary server:
42-
```shell
43-
cd notary/server
44-
cargo run --release
45-
```
32+
* Use docker
33+
```sh
34+
npm run notary
35+
```
36+
* Or, compile and run the notary server natively:
37+
```sh
38+
# Clone the TLSNotary repository:
39+
git clone https://github.com/tlsnotary/tlsn.git --branch "v0.1.0-alpha.9"
40+
cd tlsn/crates/notary/server/
41+
# Run the ntoary server
42+
cargo run --release -- --tls-enabled false
43+
```
4644

4745
The notary server will now be running in the background waiting for connections.
4846

4947
## `tlsn-js` in a React/Typescript app
5048

51-
### Run the
52-
1. Clone the repository
53-
```sh
54-
git clone https://github.com/tlsnotary/tlsn-js
55-
```
56-
2. Compile tlns-js
49+
1. Compile tlns-js
5750
```sh
5851
npm i
5952
npm run build
6053
```
6154
2. Go to the demo folder
6255
```sh
63-
cd ./tlsn-js/demo/react-ts-webpack
56+
cd demo/react-ts-webpack
6457
```
6558
3. Install dependencies
6659
```sh

readme.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ The `./demo` folder contains three demos of `tlsn-js`:
3939

4040
In the demos, we attest data from the `https://swapi.dev` website. Because the browser does not allow for TCP connections, you need to set up a websocket proxy:
4141

42-
1. Install [websocat](https://github.com/vi/websocat):
42+
1. Install [wstcp](https://github.com/sile/wstcp):
4343

44-
| Tool | Command |
45-
| ------ | ------------------------------ |
46-
| cargo | `cargo install websocat` |
47-
| brew | `brew install websocat` |
48-
| source | https://github.com/vi/websocat |
44+
| Tool | Command |
45+
| ------ | ----------------------------- |
46+
| cargo | `cargo install wstcp` |
47+
| brew | `brew install wstcp` |
48+
| source | https://github.com/sile/wstcp |
4949

5050
2. Run a websocket proxy for `https://swapi.dev`:
5151
```sh
52-
websocat --binary -v ws-l:0.0.0.0:55688 tcp:swapi.dev:443
52+
wstcp --bind-addr 127.0.0.1:55688 swapi.dev:443
5353
```
5454

5555
## Install as NPM Package

0 commit comments

Comments
 (0)