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

Commit

Permalink
update offering and credentialSchema id
Browse files Browse the repository at this point in the history
  • Loading branch information
acekyd committed Aug 22, 2024
1 parent 258b29f commit 9d3530d
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 61 deletions.
2 changes: 1 addition & 1 deletion src/credential-issuer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export async function requestCredential(
countryOfResidence: country
},
credentialSchema: {
id: 'https://schema.org/PFI',
id: 'https://vc.schemas.host/kcc.schema.json',
type: 'JsonSchema'
},
})
Expand Down
160 changes: 100 additions & 60 deletions src/offeringData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ export const offeringDataGHSToUSDC: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -123,11 +125,13 @@ export const offeringDataNGNToKES: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -199,11 +203,13 @@ export const offeringDataKESToUSD: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -290,11 +296,13 @@ export const offeringDataUSDToKES: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -366,11 +374,13 @@ export const offeringDataKESToUSD2: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -436,11 +446,13 @@ export const offeringDataKESToUSDC: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -506,11 +518,13 @@ export const offeringDataNGNToGHS: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -591,11 +605,13 @@ export const offeringDataBTCToNGN: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -688,11 +704,13 @@ export const offeringDataUSDToEUR: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -785,11 +803,13 @@ export const offeringDataEURToUSD: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -882,11 +902,13 @@ export const offeringDataUSDToGBP: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -973,11 +995,13 @@ export const offeringDataUSDToBTC: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -1069,11 +1093,13 @@ export const offeringDataEURToUSD2: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -1160,11 +1186,13 @@ export const offeringDataEURToUSDC: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -1257,11 +1285,13 @@ export const offeringDataUSDToEUR2: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -1354,11 +1384,13 @@ export const offeringDataEURToGBP: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -1450,11 +1482,13 @@ export const offeringDataUSDToAUD: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -1547,11 +1581,13 @@ export const offeringDataUSDToGBP2: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -1638,11 +1674,13 @@ export const offeringDataUSDToKES2: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down Expand Up @@ -1735,11 +1773,13 @@ export const offeringDataUSDToMXN: OfferingData = {
constraints: {
fields: [
{
path: ['$.type[*]'],
path: [
'$.credentialSchema[*].id'
],
filter: {
type: 'string',
const: 'KnownCustomerCredential',
},
const: 'https://vc.schemas.host/kcc.schema.json'
}
},
{
path: ['$.issuer'],
Expand Down

0 comments on commit 9d3530d

Please sign in to comment.