mirror of
https://github.com/tlsnotary/tlsn-plugin-demo.git
synced 2026-01-08 04:54:07 -05:00
fix: cleanup
This commit is contained in:
@@ -43,7 +43,7 @@ app.get('*', (req, res) => {
|
||||
const storeConfig: AppRootState = {
|
||||
attestation: {
|
||||
raw: {
|
||||
version: '0.1.0-alpha.7',
|
||||
version: '0.1.0-alpha.8',
|
||||
data: '',
|
||||
meta: {
|
||||
notaryUrl: '',
|
||||
@@ -135,14 +135,12 @@ app.post('/verify-attestation', async (req, res) => {
|
||||
if (!attestation) {
|
||||
return res.status(400).send('Missing attestation');
|
||||
}
|
||||
console.log(attestation);
|
||||
|
||||
try {
|
||||
const notaryUrl = convertNotaryWsToHttp(attestation.meta.notaryUrl);
|
||||
console.log(notaryUrl);
|
||||
const notaryPem = await fetchPublicKeyFromNotary(notaryUrl);
|
||||
console.log(notaryPem);
|
||||
const presentation = await verify(attestation.data, notaryPem);
|
||||
console.log(presentation);
|
||||
|
||||
const presentationObj = {
|
||||
sent: presentation.sent,
|
||||
recv: presentation.recv,
|
||||
|
||||
@@ -21,7 +21,7 @@ export type State = {
|
||||
|
||||
export const initState: State = {
|
||||
raw: {
|
||||
version: '0.1.0-alpha.7',
|
||||
version: '0.1.0-alpha.8',
|
||||
data: '',
|
||||
meta: {
|
||||
notaryUrl: '',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export interface AttestedData {
|
||||
version: '0.1.0-alpha.7' | '0.1.0-alpha.5';
|
||||
version: '0.1.0-alpha.8' | '0.1.0-alpha.7' | '0.1.0-alpha.5';
|
||||
time: number;
|
||||
sent: string;
|
||||
recv: string;
|
||||
@@ -10,7 +10,7 @@ export interface AttestedData {
|
||||
}
|
||||
|
||||
export type Attestation = {
|
||||
version: '0.1.0-alpha.7';
|
||||
version: '0.1.0-alpha.8' | '0.1.0-alpha.7';
|
||||
data: string;
|
||||
meta: {
|
||||
notaryUrl: string;
|
||||
|
||||
Reference in New Issue
Block a user