Skip to content

Commit

Permalink
fix(wasm): change commit_sent to commit_recv (#23)
Browse files Browse the repository at this point in the history
* fix(wasm): change commit_sent to commit_recv

* fix: fix tests (alpha4)

* test: Test redactions

* fix: skip puppeteer chrome install

* chore: fix linter

---------

Co-authored-by: Hendrik Eeckhaut <[email protected]>
  • Loading branch information
0xtsukino and heeckhau authored Feb 22, 2024
1 parent 9eeb191 commit bc93d4e
Show file tree
Hide file tree
Showing 14 changed files with 14,777 additions and 59 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [ main ]

env:
PUPPETEER_SKIP_DOWNLOAD: true

jobs:
build:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
env:
LOCAL: true
HEADLESS: true
PUPPETEER_SKIP_DOWNLOAD: true

jobs:
build:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ wasm-pack.log
node_modules/
.idea/
.DS_Store
pnpm-lock.yaml
build/
dev-build/
test-build/
Expand Down
65 changes: 33 additions & 32 deletions demo/react-ts-webpack/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ReactElement, useCallback, useEffect, useState } from 'react';
import { createRoot } from 'react-dom/client';
import { prove, verify } from 'tlsn-js';
import { Proof } from 'tlsn-js/build/types';
import { Watch } from 'react-loader-spinner'
import { Watch } from 'react-loader-spinner';

const container = document.getElementById('root');
const root = createRoot(container!);
Expand Down Expand Up @@ -47,40 +47,41 @@ function App(): ReactElement {
</button>
<div>
<b>Proof: </b>
{!processing && !proof
? <i>not started</i>
: !proof
? <>
Proving data from swapi...
<Watch
visible={true}
height="40"
width="40"
radius="48"
color="#000000"
ariaLabel="watch-loading"
wrapperStyle={{}}
wrapperClass=""
/>
Open <i>Developer tools</i> to follow progress
</>
: <>
<details>
<summary>View Proof</summary>
<pre>{JSON.stringify(proof, null, 2)}</pre>
</details>
</>
}

{!processing && !proof ? (
<i>not started</i>
) : !proof ? (
<>
Proving data from swapi...
<Watch
visible={true}
height="40"
width="40"
radius="48"
color="#000000"
ariaLabel="watch-loading"
wrapperStyle={{}}
wrapperClass=""
/>
Open <i>Developer tools</i> to follow progress
</>
) : (
<>
<details>
<summary>View Proof</summary>
<pre>{JSON.stringify(proof, null, 2)}</pre>
</details>
</>
)}
</div>
<div>
<b>Verification: </b>
{!proof
? <i>not started</i>
: !result
? <i>verifying</i>
: <pre>{JSON.stringify(result, null, 2)}</pre>
}
{!proof ? (
<i>not started</i>
) : !result ? (
<i>verifying</i>
) : (
<pre>{JSON.stringify(result, null, 2)}</pre>
)}
</div>
</div>
);
Expand Down
8 changes: 4 additions & 4 deletions demo/react-ts-webpack/webpack.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var webpack = require('webpack'),
path = require("path"),
CopyWebpackPlugin = require("copy-webpack-plugin"),
path = require('path'),
CopyWebpackPlugin = require('copy-webpack-plugin'),
HtmlWebpackPlugin = require('html-webpack-plugin');

const ASSET_PATH = process.env.ASSET_PATH || '/';
Expand Down Expand Up @@ -80,8 +80,8 @@ var options = {
new CopyWebpackPlugin({
patterns: [
{
from: "node_modules/tlsn-js/build",
to: path.join(__dirname, "build"),
from: 'node_modules/tlsn-js/build',
to: path.join(__dirname, 'build'),
force: true,
},
],
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bc93d4e

Please sign in to comment.