Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Update KCC Credential validations (#51)
Browse files Browse the repository at this point in the history
* Adding KCC prototype

* complete kcc integration

* Update the readme

* set deployment hosts for DIDs

* update offerings protocol and KCC requirement

* revert manual protocol specification

* Update KCC crede t

* Update KCC schema and offering requirement

* update offerings
  • Loading branch information
acekyd authored Aug 27, 2024
1 parent e37d5be commit 0c875ce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ await rfq.sign(alice)
try {
await TbdexHttpClient.createExchange(rfq)
} catch (error) {
console.log('Can\'t create:', error)
console.log('Can\'t create:', error.details.errors)
}
console.log('sent RFQ: ', JSON.stringify(rfq, null, 2))

Expand Down
4 changes: 4 additions & 0 deletions javascript/tbdex-pfi-exemplar/src/example/issuer/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ app.post('/oid4vci/credential', async (req, res) => {
data : {
something: 'relevant'
},
credentialSchema: {
id: 'https://vc.schemas.host/kcc.schema.json',
type: 'JsonSchema'
},
})
const vcJwt = await vc.sign({did: issuerDid})

Expand Down
10 changes: 4 additions & 6 deletions javascript/tbdex-pfi-exemplar/src/seed-offerings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ async function main() {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: ['$.vc.type[*]', '$.type[*]'],
filter: {
type: 'string',
pattern: '^SanctionCredential$',
},
},
{
path: ['$.issuer'],
path: ['$.vc.issuer', '$.issuer'],
filter: {
type: 'string',
const: issuerDid.trim() // Use the read issuer DID here
Expand Down Expand Up @@ -221,16 +221,14 @@ async function main() {
constraints: {
fields: [
{
path: [
'$.credentialSchema[*].id'
],
path: ['$.vc.type[*]', '$.type[*]'],
filter: {
type: 'string',
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
path: ['$.vc.issuer', '$.issuer'],
filter: {
type: 'string',
const: issuerDid.trim() // Use the read issuer DID here
Expand Down

0 comments on commit 0c875ce

Please sign in to comment.