Skip to content

Commit

Permalink
Applied feedback from reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
heeckhau committed Jan 8, 2024
1 parent ee95809 commit e68547c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions tlsn/examples/discord/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Notarize Discord DMs

The `discord_dm.rs` example sets up a TLS connection with Discord and notarizes the requested DMs. The notarized session is written to a local JSON file (`discord_dm_notarized_session.json`) for easier inspection.
The `discord_dm.rs` example sets up a TLS connection with Discord and notarizes the requested DMs. The notarized session and the proof are written to local JSON files (`discord_dm_notarized_session.json` and `discord_dm_proof.json`) for easier inspection.

This involves 3 steps:
1. Configure the inputs
2. Start the (local) notary server
3. Notarize

P/S: The notary server used in this example is more functional compared to its [simple version](../simple/simple_notary.rs). The simple version is easier to integrate with from prover perspective, whereas this notary server provides additional features like TLS connection with prover, WebSocket endpoint, API endpoints for further customisation etc.

## Inputs

In this tlsn/examples/discord folder, create a `.env` file.
Expand Down Expand Up @@ -105,5 +103,4 @@ cargo run --release --example discord_dm_verifier

This will verify the proof and print out the redacted transcript!


> **_NOTE:_** ℹ️ <https://tlsnotary.github.io/proof_viz/> hosts a generic proof visualizer. Drag and drop your proof into the drop zone to check and render your proof.
2 changes: 1 addition & 1 deletion tlsn/examples/simple/simple_prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async fn main() {
// Prepare for notarization.
let prover = prover.start_notarize();

//Build proof (with or without redactions)
// Build proof (with or without redactions)
let redact = false;
let proof = if !redact {
build_proof_without_redactions(prover).await
Expand Down
1 change: 0 additions & 1 deletion tlsn/examples/twitter/twitter_dm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ async fn main() {
// Commit to everything but the redacted tokens
let mut commitment_ids = public_ranges
.iter()
// .chain(private_ranges.iter())
.map(|range| builder.commit_sent(range.clone()).unwrap())
.collect::<Vec<_>>();
commitment_ids.push(builder.commit_recv(0..recv_len).unwrap());
Expand Down

0 comments on commit e68547c

Please sign in to comment.