Skip to content

Commit

Permalink
Fix credential extraction.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrizagidulin committed Jan 16, 2025
1 parent 6068ec4 commit 60b0e7b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,12 @@ const Home: NextPage = () => {
query: [
{
type: 'QueryByExample',
reason: 'VerifierPlus is requesting any credential for verification.',
type: ['VerifiableCredential']
credentialQuery: {
reason: 'VerifierPlus is requesting any credential for verification.',
example: {
type: ['VerifiableCredential']
}
}
}
]
}
Expand All @@ -129,7 +133,11 @@ const Home: NextPage = () => {
console.log(chapiResult);

const { data: vp } = chapiResult
setCredential(vp)
const vc = extractCredentialsFrom(vp)[0]

console.log('Extracted VC:', vc)

setCredential(vc)
}

async function getJSONFromURL(url: string) {
Expand Down

0 comments on commit 60b0e7b

Please sign in to comment.