fix: cleanup

This commit is contained in:
Codetrauma
2025-03-13 10:50:23 -07:00
parent 2d9f09bb91
commit 312db25361
3 changed files with 6 additions and 8 deletions

View File

@@ -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,

View File

@@ -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: '',

View File

@@ -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;