From 9335985aca15281a220077fd6be0cb16177345d3 Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 18 Jun 2025 15:37:37 +0200 Subject: [PATCH 1/6] chore: update config options --- src/lib.ts | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/lib.ts b/src/lib.ts index 1108c7d..bf11815 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -78,13 +78,14 @@ export class Prover { }; body?: unknown; maxSentData?: number; + maxSentRecords?: number, maxRecvData?: number; maxRecvDataOnline?: number; - maxSentRecords?: number, - maxRecvRecords?: number, + maxRecvRecordsOnline?: number, network?: NetworkSetting deferDecryptionFromStart?: boolean; commit?: Commit; + clientAuth?: [Buffer[], Buffer] }): Promise { const { url, @@ -92,27 +93,29 @@ export class Prover { headers = {}, body, maxSentData = 1024, + maxSentRecords, maxRecvData = 1024, maxRecvDataOnline, - maxSentRecords, - maxRecvRecords, + maxRecvRecordsOnline, network = 'Bandwidth', deferDecryptionFromStart, notaryUrl, websocketProxyUrl, commit: _commit, + clientAuth, } = options; const hostname = new URL(url).hostname; const notary = NotaryServer.from(notaryUrl); const prover = new WasmProver({ server_name: hostname, max_sent_data: maxSentData, + max_sent_records: maxSentRecords, max_recv_data: maxRecvData, max_recv_data_online: maxRecvDataOnline, + max_recv_records_online: maxRecvRecordsOnline, defer_decryption_from_start: deferDecryptionFromStart, - max_sent_records: maxSentRecords, - max_recv_records: maxRecvRecords, network: network, + client_auth: clientAuth, }); await prover.setup(await notary.sessionUrl(maxSentData, maxRecvData)); @@ -150,22 +153,24 @@ export class Prover { constructor(config: { serverDns: string; maxSentData?: number; + maxSentRecords?: number, maxRecvData?: number; maxRecvDataOnline?: number; + maxRecvRecordsOnline?: number, deferDecryptionFromStart?: boolean; - max_sent_records?: number, - max_recv_records?: number, network?: NetworkSetting + clientAuth?: [Buffer[], Buffer], }) { this.#config = { server_name: config.serverDns, - max_recv_data: config.maxRecvData || 1024, max_sent_data: config.maxSentData || 1024, + max_sent_records: config.maxSentRecords, + max_recv_data: config.maxRecvData || 1024, max_recv_data_online: config.maxRecvDataOnline, + max_recv_records_online: config.maxRecvRecordsOnline, defer_decryption_from_start: config.deferDecryptionFromStart, - max_sent_records: config.max_sent_records, - max_recv_records: config.max_recv_records, network: config.network || 'Bandwidth', + client_auth: config.clientAuth }; this.#prover = new WasmProver(this.#config); } @@ -279,12 +284,12 @@ export class Verifier { #config: VerifierConfig; #verifier: WasmVerifier; - constructor(config: { maxSentData?: number; maxRecvData?: number; maxSentRecords?: number; maxRecvRecords?: number }) { + constructor(config: { maxSentData?: number; maxRecvData?: number; maxSentRecords?: number; maxRecvRecordsOnline?: number }) { this.#config = { max_recv_data: config.maxRecvData || 1024, max_sent_data: config.maxSentData || 1024, max_sent_records: config.maxSentRecords, - max_recv_records: config.maxRecvRecords, + max_recv_records_online: config.maxRecvRecordsOnline, }; this.#verifier = new WasmVerifier(this.#config); } From 32264679cbe1595cfd2c259af96e7a8835ba955a Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Thu, 19 Jun 2025 14:24:28 +0200 Subject: [PATCH 2/6] Alpha.12 --- .github/workflows/ci.yaml | 2 +- .github/workflows/playwright.yml | 2 +- demo/interactive-demo/prover-rs/Cargo.toml | 6 +++--- demo/interactive-demo/prover-rs/src/main.rs | 2 +- demo/interactive-demo/prover-ts/src/app.tsx | 2 +- demo/interactive-demo/verifier-rs/Cargo.toml | 6 +++--- demo/react-ts-webpack/README.md | 2 +- demo/react-ts-webpack/src/app.tsx | 4 ++-- demo/web-to-web-p2p/src/app.tsx | 4 ++-- package.json | 8 ++++---- playwright-test/full-integration.spec.ts | 2 +- quickstart.md | 2 +- src/lib.ts | 4 ++-- src/types.ts | 2 +- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index efb7816..7cc65b4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,7 +13,7 @@ jobs: RELEASE_MODE: 'dry-run' # dry-run by default, will be set to 'publish' for release builds services: notary-server: - image: ghcr.io/tlsnotary/tlsn/notary-server:v0.1.0-alpha.11 + image: ghcr.io/tlsnotary/tlsn/notary-server:v0.1.0-alpha.12 ports: - 7047:7047 steps: diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 151c24a..c060ff4 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest services: notary-server: - image: ghcr.io/tlsnotary/tlsn/notary-server:v0.1.0-alpha.11 + image: ghcr.io/tlsnotary/tlsn/notary-server:v0.1.0-alpha.12 env: NOTARY_SERVER__TLS__ENABLED: false ports: diff --git a/demo/interactive-demo/prover-rs/Cargo.toml b/demo/interactive-demo/prover-rs/Cargo.toml index 5395e30..37434d0 100644 --- a/demo/interactive-demo/prover-rs/Cargo.toml +++ b/demo/interactive-demo/prover-rs/Cargo.toml @@ -25,8 +25,8 @@ tracing-subscriber = { version ="0.3.18", features = ["env-filter"] } uuid = { version = "1.4.1", features = ["v4", "fast-rng"] } ws_stream_tungstenite = { version = "0.13", features = ["tokio_io"] } -tlsn-core = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.11", package = "tlsn-core" } -tlsn-prover = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.11", package = "tlsn-prover" } -tlsn-common = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.11", package = "tlsn-common" } +tlsn-core = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.12", package = "tlsn-core" } +tlsn-prover = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.12", package = "tlsn-prover" } +tlsn-common = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.12", package = "tlsn-common" } spansy = {git = "https://github.com/tlsnotary/tlsn-utils", package = "spansy", branch = "dev"} rangeset = "0.2.0" diff --git a/demo/interactive-demo/prover-rs/src/main.rs b/demo/interactive-demo/prover-rs/src/main.rs index d926ea1..8768703 100644 --- a/demo/interactive-demo/prover-rs/src/main.rs +++ b/demo/interactive-demo/prover-rs/src/main.rs @@ -28,7 +28,7 @@ const MAX_RECV_DATA: usize = 1 << 14; const SECRET: &str = "TLSNotary's private key 🤡"; /// Make sure the following url's domain is the same as SERVER_DOMAIN on the verifier side -const SERVER_URL: &str = "https://raw.githubusercontent.com/tlsnotary/tlsn/refs/tags/v0.1.0-alpha.11/crates/server-fixture/server/src/data/1kb.json"; +const SERVER_URL: &str = "https://raw.githubusercontent.com/tlsnotary/tlsn/refs/tags/v0.1.0-alpha.12/crates/server-fixture/server/src/data/1kb.json"; #[tokio::main] async fn main() { diff --git a/demo/interactive-demo/prover-ts/src/app.tsx b/demo/interactive-demo/prover-ts/src/app.tsx index 07c7b96..0179b05 100644 --- a/demo/interactive-demo/prover-ts/src/app.tsx +++ b/demo/interactive-demo/prover-ts/src/app.tsx @@ -17,7 +17,7 @@ const root = createRoot(container!); root.render(); -const serverUrl = 'https://raw.githubusercontent.com/tlsnotary/tlsn/refs/tags/v0.1.0-alpha.11/crates/server-fixture/server/src/data/1kb.json'; +const serverUrl = 'https://raw.githubusercontent.com/tlsnotary/tlsn/refs/tags/v0.1.0-alpha.12/crates/server-fixture/server/src/data/1kb.json'; // const websocketProxyUrl = `wss://notary.pse.dev/proxy`; const websocketProxyUrl = 'ws://localhost:55688'; const verifierProxyUrl = 'ws://localhost:9816/verify'; diff --git a/demo/interactive-demo/verifier-rs/Cargo.toml b/demo/interactive-demo/verifier-rs/Cargo.toml index fdb9a5c..b31ddba 100644 --- a/demo/interactive-demo/verifier-rs/Cargo.toml +++ b/demo/interactive-demo/verifier-rs/Cargo.toml @@ -32,7 +32,7 @@ tracing = "0.1.40" tracing-subscriber = { version ="0.3.18", features = ["env-filter"] } ws_stream_tungstenite = { version = "0.13", features = ["tokio_io"] } -tlsn-core = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.11", package = "tlsn-core" } -tlsn-verifier = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.11", package = "tlsn-verifier" } -tlsn-common = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.11", package = "tlsn-common" } +tlsn-core = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.12", package = "tlsn-core" } +tlsn-verifier = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.12", package = "tlsn-verifier" } +tlsn-common = { git = "https://github.com/tlsnotary/tlsn.git", tag = "v0.1.0-alpha.12", package = "tlsn-common" } tower-util = "0.3.1" diff --git a/demo/react-ts-webpack/README.md b/demo/react-ts-webpack/README.md index 20f8328..78f3a1d 100644 --- a/demo/react-ts-webpack/README.md +++ b/demo/react-ts-webpack/README.md @@ -51,7 +51,7 @@ If you want to use the hosted PSE notary and proxy: 1. Open `app.tsx` in your editor. 2. Replace the notary URL: ```ts - notaryUrl: 'https://notary.pse.dev/v0.1.0-alpha.11', + notaryUrl: 'https://notary.pse.dev/v0.1.0-alpha.12', ``` This uses the [PSE](https://pse.dev) notary server to notarize the API request. You can use a different or [local notary](#run-a-local-notary-server); a local server will be faster due to the high bandwidth and low network latency. 3. Replace the websocket proxy URL: diff --git a/demo/react-ts-webpack/src/app.tsx b/demo/react-ts-webpack/src/app.tsx index ccb0f89..7d32c0f 100644 --- a/demo/react-ts-webpack/src/app.tsx +++ b/demo/react-ts-webpack/src/app.tsx @@ -26,13 +26,13 @@ root.render(); const local = true; // Toggle between local and remote notary const notaryUrl = local ? 'http://localhost:7047' - : 'https://notary.pse.dev/v0.1.0-alpha.11'; + : 'https://notary.pse.dev/v0.1.0-alpha.12'; const websocketProxyUrl = local ? 'ws://localhost:55688' : 'wss://notary.pse.dev/proxy?token=raw.githubusercontent.com'; const loggingLevel = 'Info'; // https://github.com/tlsnotary/tlsn/blob/main/crates/wasm/src/log.rs#L8 -const serverUrl = 'https://raw.githubusercontent.com/tlsnotary/tlsn/refs/tags/v0.1.0-alpha.11/crates/server-fixture/server/src/data/1kb.json'; +const serverUrl = 'https://raw.githubusercontent.com/tlsnotary/tlsn/refs/tags/v0.1.0-alpha.12/crates/server-fixture/server/src/data/1kb.json'; const serverDns = 'raw.githubusercontent.com'; function App(): ReactElement { diff --git a/demo/web-to-web-p2p/src/app.tsx b/demo/web-to-web-p2p/src/app.tsx index f5ea0d1..cf353f2 100644 --- a/demo/web-to-web-p2p/src/app.tsx +++ b/demo/web-to-web-p2p/src/app.tsx @@ -29,7 +29,7 @@ let verifierLogs: string[] = []; const p2pProxyUrl = 'ws://localhost:3001'; const serverDns = 'raw.githubusercontent.com'; const webSocketProxy = `wss://notary.pse.dev/proxy?token=${serverDns}`; -const requestUrl = `https://raw.githubusercontent.com/tlsnotary/tlsn/refs/tags/v0.1.0-alpha.11/crates/server-fixture/server/src/data/1kb.json`; +const requestUrl = `https://raw.githubusercontent.com/tlsnotary/tlsn/refs/tags/v0.1.0-alpha.12/crates/server-fixture/server/src/data/1kb.json`; function App(): ReactElement { const [ready, setReady] = useState(false); @@ -225,7 +225,7 @@ function App(): ReactElement { This demo showcases peer-to-peer communication between a web prover and a web verifier using TLSNotary. The prover fetches data from{' '} = 16.20.2" }, "dependencies": { - "tlsn-wasm": "0.1.0-alpha.11" + "tlsn-wasm": "0.1.0-alpha.12" } } \ No newline at end of file diff --git a/playwright-test/full-integration.spec.ts b/playwright-test/full-integration.spec.ts index 3a032e8..b303411 100644 --- a/playwright-test/full-integration.spec.ts +++ b/playwright-test/full-integration.spec.ts @@ -13,7 +13,7 @@ test('full-integration', async ({ page }) => { const json = await page.getByTestId('full-integration').innerText(); const { sent, recv, server_name, version, meta } = JSON.parse(json); - expect(version).toBe('0.1.0-alpha.11'); + expect(version).toBe('0.1.0-alpha.12'); expect(new URL(meta.notaryUrl!).protocol === 'http:'); expect(server_name).toBe('raw.githubusercontent.com'); diff --git a/quickstart.md b/quickstart.md index 8af53d9..00f02f4 100644 --- a/quickstart.md +++ b/quickstart.md @@ -36,7 +36,7 @@ For this demo, we also need to run a local notary server. * Or, compile and run the notary server natively: ```sh # Clone the TLSNotary repository: - git clone https://github.com/tlsnotary/tlsn.git --branch "v0.1.0-alpha.11" + git clone https://github.com/tlsnotary/tlsn.git --branch "v0.1.0-alpha.12" cd tlsn/crates/notary/server/ # Run the notary server cargo run --release diff --git a/src/lib.ts b/src/lib.ts index bf11815..9bcda33 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -141,7 +141,7 @@ export class Prover { const presentation = build_presentation(attestation, secrets, commit); return { - version: '0.1.0-alpha.11', + version: '0.1.0-alpha.12', data: arrayToHex(presentation.serialize()), meta: { notaryUrl: notary.normalizeUrl(), @@ -354,7 +354,7 @@ export class Presentation { async json(): Promise { return { - version: '0.1.0-alpha.11', + version: '0.1.0-alpha.12', data: await this.serialize(), meta: { notaryUrl: this.#notaryUrl diff --git a/src/types.ts b/src/types.ts index d91dd89..a9771f5 100644 --- a/src/types.ts +++ b/src/types.ts @@ -4,7 +4,7 @@ export type CommitData = { }; export type PresentationJSON = { - version: '0.1.0-alpha.7' | '0.1.0-alpha.8' | '0.1.0-alpha.9' | '0.1.0-alpha.10' | '0.1.0-alpha.11'; + version: '0.1.0-alpha.7' | '0.1.0-alpha.8' | '0.1.0-alpha.9' | '0.1.0-alpha.10' | '0.1.0-alpha.11' | '0.1.0-alpha.12'; data: string; meta: { notaryUrl?: string; From 089e4bfbc4843546a97c06347a1761b104f6541a Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Thu, 19 Jun 2025 15:43:14 +0200 Subject: [PATCH 3/6] Alpha.12 --- demo/interactive-demo/prover-ts/src/app.tsx | 5 +++-- demo/react-ts-webpack/README.md | 5 ++--- demo/react-ts-webpack/src/app.tsx | 2 +- demo/web-to-web-p2p/src/app.tsx | 2 +- package-lock.json | 12 ++++++------ src/lib.ts | 3 ++- test/e2e/full-integration.spec.ts | 7 ++++++- 7 files changed, 21 insertions(+), 15 deletions(-) diff --git a/demo/interactive-demo/prover-ts/src/app.tsx b/demo/interactive-demo/prover-ts/src/app.tsx index 0179b05..92e2ee0 100644 --- a/demo/interactive-demo/prover-ts/src/app.tsx +++ b/demo/interactive-demo/prover-ts/src/app.tsx @@ -6,7 +6,7 @@ import { Prover as TProver } from 'tlsn-js'; import { type Method } from 'tlsn-wasm'; import './app.scss'; import { HTTPParser } from 'http-parser-js'; -import { Commit, mapStringToRange, subtractRanges } from 'tlsn-js'; +import { Reveal, mapStringToRange, subtractRanges } from 'tlsn-js'; const { init, Prover }: any = Comlink.wrap( new Worker(new URL('./worker.ts', import.meta.url)), @@ -95,7 +95,7 @@ function App(): ReactElement { console.log("test", body.information.address.street); console.time('reveal'); - const reveal: Commit = { + const reveal: Reveal = { sent: subtractRanges( { start: 0, end: sent.length }, mapStringToRange( @@ -121,6 +121,7 @@ function App(): ReactElement { Buffer.from(recv).toString('utf-8'), ), ], + server_identity: true, }; console.log('Start reveal:', reveal); await prover.reveal(reveal); diff --git a/demo/react-ts-webpack/README.md b/demo/react-ts-webpack/README.md index 78f3a1d..46ad958 100644 --- a/demo/react-ts-webpack/README.md +++ b/demo/react-ts-webpack/README.md @@ -51,7 +51,7 @@ If you want to use the hosted PSE notary and proxy: 1. Open `app.tsx` in your editor. 2. Replace the notary URL: ```ts - notaryUrl: 'https://notary.pse.dev/v0.1.0-alpha.12', + notaryUrl: 'https://notary.pse.dev/v0.1.0-alpha.11', ``` This uses the [PSE](https://pse.dev) notary server to notarize the API request. You can use a different or [local notary](#run-a-local-notary-server); a local server will be faster due to the high bandwidth and low network latency. 3. Replace the websocket proxy URL: @@ -75,5 +75,4 @@ If you want to use the hosted PSE notary and proxy: 3. **Open the demo in your browser:** Go to [http://localhost:8080](http://localhost:8080) 4. **Click the "Start demo" button** -5. **Open Developer Tools** and monitor the console logs -œœ \ No newline at end of file +5. **Open Developer Tools** and monitor the console logs \ No newline at end of file diff --git a/demo/react-ts-webpack/src/app.tsx b/demo/react-ts-webpack/src/app.tsx index 7d32c0f..15e9252 100644 --- a/demo/react-ts-webpack/src/app.tsx +++ b/demo/react-ts-webpack/src/app.tsx @@ -127,7 +127,7 @@ function App(): ReactElement { secretsHex: notarizationOutputs.secrets, notaryUrl: notarizationOutputs.notaryUrl, websocketProxyUrl: notarizationOutputs.websocketProxyUrl, - reveal: commit, + reveal: { ...commit, server_identity: false }, })) as TPresentation; console.log(await presentation.serialize()); diff --git a/demo/web-to-web-p2p/src/app.tsx b/demo/web-to-web-p2p/src/app.tsx index cf353f2..77403c9 100644 --- a/demo/web-to-web-p2p/src/app.tsx +++ b/demo/web-to-web-p2p/src/app.tsx @@ -200,7 +200,7 @@ function App(): ReactElement { ), ], }; - await prover.reveal(commit); + await prover.reveal({ ...commit, server_identity: false }); addProverLog('Data revealed to verifier'); const result = await verified; diff --git a/package-lock.json b/package-lock.json index c632d5f..c1287a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "tlsn-js", - "version": "0.1.0-alpha.11.0", + "version": "0.1.0-alpha.12.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "tlsn-js", - "version": "0.1.0-alpha.11.0", + "version": "0.1.0-alpha.12.0", "license": "ISC", "dependencies": { - "tlsn-wasm": "0.1.0-alpha.11" + "tlsn-wasm": "0.1.0-alpha.12" }, "devDependencies": { "@playwright/test": "^1.52.0", @@ -10728,9 +10728,9 @@ } }, "node_modules/tlsn-wasm": { - "version": "0.1.0-alpha.11", - "resolved": "https://registry.npmjs.org/tlsn-wasm/-/tlsn-wasm-0.1.0-alpha.11.tgz", - "integrity": "sha512-3QjS5BaPwjZiPwAjMs7ZVSuCOXjvxyxEIPQdDbGa3G5drXu2rfu15zJvDEnrb/SneXD8+/Qk1ZSiB7eYjXBSmQ==", + "version": "0.1.0-alpha.12", + "resolved": "https://registry.npmjs.org/tlsn-wasm/-/tlsn-wasm-0.1.0-alpha.12.tgz", + "integrity": "sha512-0HlhM466ewogualMmpevFAgfWfUh1qwt/RjbOKSQiE+EPK99x8BrMBlChAxjnCxWpuUaDfaVEXTEPF07RYBtuQ==", "license": "MIT OR Apache-2.0" }, "node_modules/to-buffer": { diff --git a/src/lib.ts b/src/lib.ts index 9bcda33..da02750 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -138,7 +138,8 @@ export class Prover { const { attestation, secrets } = await prover.notarize(commit); - const presentation = build_presentation(attestation, secrets, commit); + const reveal: Reveal = { ...commit, server_identity: false } + const presentation = build_presentation(attestation, secrets, reveal); return { version: '0.1.0-alpha.12', diff --git a/test/e2e/full-integration.spec.ts b/test/e2e/full-integration.spec.ts index c1b4f66..87d527f 100644 --- a/test/e2e/full-integration.spec.ts +++ b/test/e2e/full-integration.spec.ts @@ -6,6 +6,7 @@ import { mapStringToRange, subtractRanges, Transcript, + Reveal, } from '../../src/lib'; import * as Comlink from 'comlink'; import { HTTPParser } from 'http-parser-js'; @@ -79,10 +80,14 @@ const { init, Prover, Presentation }: any = Comlink.wrap( }; console.log(commit); const notarizationOutput = await prover.notarize(commit); + const reveal: Reveal = { + ...commit, + server_identity: false, + }; const presentation = (await new Presentation({ attestationHex: notarizationOutput.attestation, secretsHex: notarizationOutput.secrets, - reveal: commit, + reveal: reveal, notaryUrl: notary.url, websocketProxyUrl: 'wss://notary.pse.dev/proxy', })) as _Presentation; From 105c0729acd54c0f451db30780b15f777227767a Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Thu, 19 Jun 2025 16:01:21 +0200 Subject: [PATCH 4/6] Alpha.12 --- src/lib.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.ts b/src/lib.ts index da02750..35ce4a7 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -160,7 +160,7 @@ export class Prover { maxRecvRecordsOnline?: number, deferDecryptionFromStart?: boolean; network?: NetworkSetting - clientAuth?: [Buffer[], Buffer], + clientAuth?: [number[][], number[]] | undefined, }) { this.#config = { server_name: config.serverDns, @@ -334,6 +334,7 @@ export class Presentation { params.reveal || { sent: [{ start: 0, end: transcript.sent.length }], recv: [{ start: 0, end: transcript.recv.length }], + server_identity: false, }, ); this.#websocketProxyUrl = params.websocketProxyUrl; From 1316c6b21c8e8f09cce7c7ad62515510cc26a053 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Thu, 19 Jun 2025 16:26:36 +0200 Subject: [PATCH 5/6] Alpha.12 --- src/lib.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.ts b/src/lib.ts index 35ce4a7..49e4bd9 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -85,7 +85,7 @@ export class Prover { network?: NetworkSetting deferDecryptionFromStart?: boolean; commit?: Commit; - clientAuth?: [Buffer[], Buffer] + clientAuth?: [number[][], number[]]; }): Promise { const { url, From 89917d41bd3c89de6559d9fcd850bb173a4826be Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Thu, 19 Jun 2025 17:33:55 +0200 Subject: [PATCH 6/6] Alpha.12: allow to set server_identity --- src/lib.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.ts b/src/lib.ts index 49e4bd9..b4709ba 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -85,6 +85,7 @@ export class Prover { network?: NetworkSetting deferDecryptionFromStart?: boolean; commit?: Commit; + serverIdentity?: boolean clientAuth?: [number[][], number[]]; }): Promise { const { @@ -102,6 +103,7 @@ export class Prover { notaryUrl, websocketProxyUrl, commit: _commit, + serverIdentity = false, clientAuth, } = options; const hostname = new URL(url).hostname; @@ -138,7 +140,7 @@ export class Prover { const { attestation, secrets } = await prover.notarize(commit); - const reveal: Reveal = { ...commit, server_identity: false } + const reveal: Reveal = { ...commit, server_identity: serverIdentity } const presentation = build_presentation(attestation, secrets, reveal); return {