Co-authored-by: Hendrik Eeckhaut <hendrik@eeckhaut.org>
This commit is contained in:
Tanner
2025-06-02 10:32:34 +02:00
committed by GitHub
parent f34718f352
commit 9872a376c1
5 changed files with 21 additions and 20 deletions

20
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "tlsn-extension",
"version": "0.1.0.1000",
"version": "0.1.0.1100",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "tlsn-extension",
"version": "0.1.0.1000",
"version": "0.1.0.1100",
"license": "MIT",
"dependencies": {
"@extism/extism": "^2.0.0-rc11",
@@ -33,7 +33,7 @@
"redux-logger": "^3.0.6",
"redux-thunk": "^2.4.2",
"tailwindcss": "^3.3.3",
"tlsn-js": "0.1.0-alpha.10.0"
"tlsn-js": "0.1.0-alpha.11.0"
},
"devDependencies": {
"@babel/core": "^7.20.12",
@@ -14313,21 +14313,21 @@
"license": "MIT"
},
"node_modules/tlsn-js": {
"version": "0.1.0-alpha.10.0",
"resolved": "https://registry.npmjs.org/tlsn-js/-/tlsn-js-0.1.0-alpha.10.0.tgz",
"integrity": "sha512-+kwcT5AISESGmSI4sZ3rZ4VqOB/ogadTBisKB8yT8j8l5RqeI3xW+gZ+gF6ZE/Y4zEtXe3d6CbZFU11lEaAo0g==",
"version": "0.1.0-alpha.11.0",
"resolved": "https://registry.npmjs.org/tlsn-js/-/tlsn-js-0.1.0-alpha.11.0.tgz",
"integrity": "sha512-JoxhFQtDibtAHfHs0NOfalYFaP8wF2XeVbOhMikJbItyuQB8MlUP6tgHQxawnJgnGu5LzB7GG2+ZLzUj2IS8nA==",
"license": "ISC",
"dependencies": {
"tlsn-wasm": "0.1.0-alpha.10"
"tlsn-wasm": "0.1.0-alpha.11"
},
"engines": {
"node": ">= 16.20.2"
}
},
"node_modules/tlsn-wasm": {
"version": "0.1.0-alpha.10",
"resolved": "https://registry.npmjs.org/tlsn-wasm/-/tlsn-wasm-0.1.0-alpha.10.tgz",
"integrity": "sha512-HgGLmaxyw18v34hxAOnVc9P/HuEjVuQeb/6TcskaSHGFOY2t2pjWBz93toinEAD2N1LwVQJXoECxsP5Qo81Haw==",
"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==",
"license": "MIT OR Apache-2.0"
},
"node_modules/tmp": {

View File

@@ -1,6 +1,6 @@
{
"name": "tlsn-extension",
"version": "0.1.0.1000",
"version": "0.1.0.1100",
"license": "MIT",
"repository": {
"type": "git",
@@ -40,7 +40,7 @@
"redux-logger": "^3.0.6",
"redux-thunk": "^2.4.2",
"tailwindcss": "^3.3.3",
"tlsn-js": "0.1.0-alpha.10.0"
"tlsn-js": "0.1.0-alpha.11.0"
},
"devDependencies": {
"@babel/core": "^7.20.12",
@@ -94,4 +94,4 @@
"webpack-ext-reloader": "^1.1.12",
"zip-webpack-plugin": "^4.0.1"
}
}
}

View File

@@ -436,8 +436,8 @@ export const endProofRequest = async (data: {
proof: VerifierOutput;
}) => {
const transcript = new Transcript({
sent: data.proof.transcript.sent,
recv: data.proof.transcript.recv,
sent: data.proof.transcript?.sent || [],
recv: data.proof.transcript?.recv || [],
});
state.presentation = {

View File

@@ -542,12 +542,13 @@ async function verifyProof(proof: PresentationJSON): Promise<{
case '0.1.0-alpha.7':
case '0.1.0-alpha.8':
case '0.1.0-alpha.9':
case '0.1.0-alpha.10':
result = {
sent: 'version not supported',
recv: 'version not supported',
};
break;
case '0.1.0-alpha.10':
case '0.1.0-alpha.11':
result = await verify(proof);
break;
}
@@ -556,14 +557,14 @@ async function verifyProof(proof: PresentationJSON): Promise<{
}
async function verify(proof: PresentationJSON) {
if (proof.version !== '0.1.0-alpha.10') {
if (proof.version !== '0.1.0-alpha.11') {
throw new Error('wrong version');
}
const presentation: TPresentation = await new Presentation(proof.data);
const verifierOutput = await presentation.verify();
const transcript = new Transcript({
sent: verifierOutput.transcript.sent,
recv: verifierOutput.transcript.recv,
sent: verifierOutput.transcript?.sent || [],
recv: verifierOutput.transcript?.recv || [],
});
const vk = await presentation.verifyingKey();
const verifyingKey = Buffer.from(vk.data).toString('hex');

View File

@@ -1,5 +1,5 @@
export const EXPLORER_API = 'https://explorer.tlsnotary.org';
export const NOTARY_API = 'https://notary.pse.dev/v0.1.0-alpha.10';
export const NOTARY_API = 'https://notary.pse.dev/v0.1.0-alpha.11';
export const RENDEZVOUS_API = 'wss://explorer.tlsnotary.org';
export const NOTARY_PROXY = 'wss://notary.pse.dev/proxy';
export const MAX_RECV = 16384;