Files
tlsn-js/utils/test.ts
2023-11-14 09:41:01 +03:00

21 lines
523 B
TypeScript

import { prove, verify, NOTARY_SERVER_PUBKEY } from '../src';
(async function runTest() {
const proof = await prove('https://swapi.dev/api/people/1', {
method: 'GET',
headers: {
Connection: 'close',
Accept: 'application/json',
'Accept-Encoding': 'identity',
},
body: '',
maxTranscriptSize: 20000,
notaryUrl: 'https://127.0.0.1:7047',
websocketProxyUrl: 'ws://127.0.0.1:55688',
});
const result = await verify(proof, NOTARY_SERVER_PUBKEY);
console.log(result);
})();