Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Construct HTTP request mostly in js #18

Closed
wants to merge 1 commit into from

Conversation

mhchia
Copy link
Contributor

@mhchia mhchia commented Oct 20, 2023

!!! Steps 1~2 have been changed!!!

What's done?

Rust WASM

  1. Rename prover to notarize
  2. Make params more abstract by accepting method, url, headers, body, secrets (to be hidden), reveals (to be public)

Javascript (worker.ts)

  1. Support notarizeTwitterDM and notarizeTwitterProfile
  2. Use public notary at notary.efprivacyscaling.org:443
  3. Tell websockify the target by token in websocketProxyURL

Steps to run

Step 1: Edit information
For general twitter info

const AUTH_TOKEN = '';
const ACCESS_TOKEN = '';
const CSRF_TOKEN = '';

To run notarizeTwitterDM, fill in

const conversationId = '';
const clientUuid = '';

To run notarizeTwitterProfile, fill in

const twitterId = '';

And choose which to run

// const resJSON = await notarizeTwitterDM();
const resJSON = await notarizeTwitterProfile();

Step 2: Open a new terminal. Build and run a websocket proxy with multiple targets

git clone https://github.com/novnc/websockify && cd websockify
./docker/build.sh
docker run -it --rm -p 55688:80 -v $(pwd):/app novnc/websockify 80 --target-config /app/websockify_target_cfg

Step 3: Build the wasm and run the dev server

pnpm install
pnpm run build:wasm
npm run dev

Step 4: Load built extension
Go to chrome://extensions, click Load unpacked, select the build directory

Step 5: Run notarize
Open the TLSN Extension and click Notarize. Check out the console by clicking the offscreen.html in the inspect views section in TLSN Extension

@mhchia mhchia requested a review from 0xtsukino October 20, 2023 16:53
@mhchia
Copy link
Contributor Author

mhchia commented Oct 24, 2023

Closed since it's covered by #20

@mhchia mhchia closed this Oct 24, 2023
@0xtsukino 0xtsukino deleted the mhchia/app-http-request-in-js branch August 22, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant