Files
tlsn-js/utils/web.ts
tsukino ddcf75fc5f v0.0.2
2023-12-19 21:11:10 -08:00

18 lines
485 B
TypeScript

import { prove, verify } from '../src';
(async function runTest() {
console.time('prove');
const proof = await prove('https://swapi.dev/api/people/1', {
method: 'GET',
maxTranscriptSize: 16384,
notaryUrl: 'http://localhost:7047',
websocketProxyUrl: 'ws://notary.efprivacyscaling.org:55688?token=swapi.dev',
});
console.timeEnd('prove');
console.time('verify');
const result = await verify(proof);
console.timeEnd('verify');
console.log(result);
})();