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

Commit 9d3530d

Browse files
committed
update offering and credentialSchema id
1 parent 258b29f commit 9d3530d

File tree

2 files changed

+101
-61
lines changed

2 files changed

+101
-61
lines changed

src/credential-issuer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export async function requestCredential(
111111
countryOfResidence: country
112112
},
113113
credentialSchema: {
114-
id: 'https://schema.org/PFI',
114+
id: 'https://vc.schemas.host/kcc.schema.json',
115115
type: 'JsonSchema'
116116
},
117117
})

src/offeringData.ts

+100-60
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@ export const offeringDataGHSToUSDC: OfferingData = {
5353
constraints: {
5454
fields: [
5555
{
56-
path: ['$.type[*]'],
56+
path: [
57+
'$.credentialSchema[*].id'
58+
],
5759
filter: {
5860
type: 'string',
59-
const: 'KnownCustomerCredential',
60-
},
61+
const: 'https://vc.schemas.host/kcc.schema.json'
62+
}
6163
},
6264
{
6365
path: ['$.issuer'],
@@ -123,11 +125,13 @@ export const offeringDataNGNToKES: OfferingData = {
123125
constraints: {
124126
fields: [
125127
{
126-
path: ['$.type[*]'],
128+
path: [
129+
'$.credentialSchema[*].id'
130+
],
127131
filter: {
128132
type: 'string',
129-
const: 'KnownCustomerCredential',
130-
},
133+
const: 'https://vc.schemas.host/kcc.schema.json'
134+
}
131135
},
132136
{
133137
path: ['$.issuer'],
@@ -199,11 +203,13 @@ export const offeringDataKESToUSD: OfferingData = {
199203
constraints: {
200204
fields: [
201205
{
202-
path: ['$.type[*]'],
206+
path: [
207+
'$.credentialSchema[*].id'
208+
],
203209
filter: {
204210
type: 'string',
205-
const: 'KnownCustomerCredential',
206-
},
211+
const: 'https://vc.schemas.host/kcc.schema.json'
212+
}
207213
},
208214
{
209215
path: ['$.issuer'],
@@ -290,11 +296,13 @@ export const offeringDataUSDToKES: OfferingData = {
290296
constraints: {
291297
fields: [
292298
{
293-
path: ['$.type[*]'],
299+
path: [
300+
'$.credentialSchema[*].id'
301+
],
294302
filter: {
295303
type: 'string',
296-
const: 'KnownCustomerCredential',
297-
},
304+
const: 'https://vc.schemas.host/kcc.schema.json'
305+
}
298306
},
299307
{
300308
path: ['$.issuer'],
@@ -366,11 +374,13 @@ export const offeringDataKESToUSD2: OfferingData = {
366374
constraints: {
367375
fields: [
368376
{
369-
path: ['$.type[*]'],
377+
path: [
378+
'$.credentialSchema[*].id'
379+
],
370380
filter: {
371381
type: 'string',
372-
const: 'KnownCustomerCredential',
373-
},
382+
const: 'https://vc.schemas.host/kcc.schema.json'
383+
}
374384
},
375385
{
376386
path: ['$.issuer'],
@@ -436,11 +446,13 @@ export const offeringDataKESToUSDC: OfferingData = {
436446
constraints: {
437447
fields: [
438448
{
439-
path: ['$.type[*]'],
449+
path: [
450+
'$.credentialSchema[*].id'
451+
],
440452
filter: {
441453
type: 'string',
442-
const: 'KnownCustomerCredential',
443-
},
454+
const: 'https://vc.schemas.host/kcc.schema.json'
455+
}
444456
},
445457
{
446458
path: ['$.issuer'],
@@ -506,11 +518,13 @@ export const offeringDataNGNToGHS: OfferingData = {
506518
constraints: {
507519
fields: [
508520
{
509-
path: ['$.type[*]'],
521+
path: [
522+
'$.credentialSchema[*].id'
523+
],
510524
filter: {
511525
type: 'string',
512-
const: 'KnownCustomerCredential',
513-
},
526+
const: 'https://vc.schemas.host/kcc.schema.json'
527+
}
514528
},
515529
{
516530
path: ['$.issuer'],
@@ -591,11 +605,13 @@ export const offeringDataBTCToNGN: OfferingData = {
591605
constraints: {
592606
fields: [
593607
{
594-
path: ['$.type[*]'],
608+
path: [
609+
'$.credentialSchema[*].id'
610+
],
595611
filter: {
596612
type: 'string',
597-
const: 'KnownCustomerCredential',
598-
},
613+
const: 'https://vc.schemas.host/kcc.schema.json'
614+
}
599615
},
600616
{
601617
path: ['$.issuer'],
@@ -688,11 +704,13 @@ export const offeringDataUSDToEUR: OfferingData = {
688704
constraints: {
689705
fields: [
690706
{
691-
path: ['$.type[*]'],
707+
path: [
708+
'$.credentialSchema[*].id'
709+
],
692710
filter: {
693711
type: 'string',
694-
const: 'KnownCustomerCredential',
695-
},
712+
const: 'https://vc.schemas.host/kcc.schema.json'
713+
}
696714
},
697715
{
698716
path: ['$.issuer'],
@@ -785,11 +803,13 @@ export const offeringDataEURToUSD: OfferingData = {
785803
constraints: {
786804
fields: [
787805
{
788-
path: ['$.type[*]'],
806+
path: [
807+
'$.credentialSchema[*].id'
808+
],
789809
filter: {
790810
type: 'string',
791-
const: 'KnownCustomerCredential',
792-
},
811+
const: 'https://vc.schemas.host/kcc.schema.json'
812+
}
793813
},
794814
{
795815
path: ['$.issuer'],
@@ -882,11 +902,13 @@ export const offeringDataUSDToGBP: OfferingData = {
882902
constraints: {
883903
fields: [
884904
{
885-
path: ['$.type[*]'],
905+
path: [
906+
'$.credentialSchema[*].id'
907+
],
886908
filter: {
887909
type: 'string',
888-
const: 'KnownCustomerCredential',
889-
},
910+
const: 'https://vc.schemas.host/kcc.schema.json'
911+
}
890912
},
891913
{
892914
path: ['$.issuer'],
@@ -973,11 +995,13 @@ export const offeringDataUSDToBTC: OfferingData = {
973995
constraints: {
974996
fields: [
975997
{
976-
path: ['$.type[*]'],
998+
path: [
999+
'$.credentialSchema[*].id'
1000+
],
9771001
filter: {
9781002
type: 'string',
979-
const: 'KnownCustomerCredential',
980-
},
1003+
const: 'https://vc.schemas.host/kcc.schema.json'
1004+
}
9811005
},
9821006
{
9831007
path: ['$.issuer'],
@@ -1069,11 +1093,13 @@ export const offeringDataEURToUSD2: OfferingData = {
10691093
constraints: {
10701094
fields: [
10711095
{
1072-
path: ['$.type[*]'],
1096+
path: [
1097+
'$.credentialSchema[*].id'
1098+
],
10731099
filter: {
10741100
type: 'string',
1075-
const: 'KnownCustomerCredential',
1076-
},
1101+
const: 'https://vc.schemas.host/kcc.schema.json'
1102+
}
10771103
},
10781104
{
10791105
path: ['$.issuer'],
@@ -1160,11 +1186,13 @@ export const offeringDataEURToUSDC: OfferingData = {
11601186
constraints: {
11611187
fields: [
11621188
{
1163-
path: ['$.type[*]'],
1189+
path: [
1190+
'$.credentialSchema[*].id'
1191+
],
11641192
filter: {
11651193
type: 'string',
1166-
const: 'KnownCustomerCredential',
1167-
},
1194+
const: 'https://vc.schemas.host/kcc.schema.json'
1195+
}
11681196
},
11691197
{
11701198
path: ['$.issuer'],
@@ -1257,11 +1285,13 @@ export const offeringDataUSDToEUR2: OfferingData = {
12571285
constraints: {
12581286
fields: [
12591287
{
1260-
path: ['$.type[*]'],
1288+
path: [
1289+
'$.credentialSchema[*].id'
1290+
],
12611291
filter: {
12621292
type: 'string',
1263-
const: 'KnownCustomerCredential',
1264-
},
1293+
const: 'https://vc.schemas.host/kcc.schema.json'
1294+
}
12651295
},
12661296
{
12671297
path: ['$.issuer'],
@@ -1354,11 +1384,13 @@ export const offeringDataEURToGBP: OfferingData = {
13541384
constraints: {
13551385
fields: [
13561386
{
1357-
path: ['$.type[*]'],
1387+
path: [
1388+
'$.credentialSchema[*].id'
1389+
],
13581390
filter: {
13591391
type: 'string',
1360-
const: 'KnownCustomerCredential',
1361-
},
1392+
const: 'https://vc.schemas.host/kcc.schema.json'
1393+
}
13621394
},
13631395
{
13641396
path: ['$.issuer'],
@@ -1450,11 +1482,13 @@ export const offeringDataUSDToAUD: OfferingData = {
14501482
constraints: {
14511483
fields: [
14521484
{
1453-
path: ['$.type[*]'],
1485+
path: [
1486+
'$.credentialSchema[*].id'
1487+
],
14541488
filter: {
14551489
type: 'string',
1456-
const: 'KnownCustomerCredential',
1457-
},
1490+
const: 'https://vc.schemas.host/kcc.schema.json'
1491+
}
14581492
},
14591493
{
14601494
path: ['$.issuer'],
@@ -1547,11 +1581,13 @@ export const offeringDataUSDToGBP2: OfferingData = {
15471581
constraints: {
15481582
fields: [
15491583
{
1550-
path: ['$.type[*]'],
1584+
path: [
1585+
'$.credentialSchema[*].id'
1586+
],
15511587
filter: {
15521588
type: 'string',
1553-
const: 'KnownCustomerCredential',
1554-
},
1589+
const: 'https://vc.schemas.host/kcc.schema.json'
1590+
}
15551591
},
15561592
{
15571593
path: ['$.issuer'],
@@ -1638,11 +1674,13 @@ export const offeringDataUSDToKES2: OfferingData = {
16381674
constraints: {
16391675
fields: [
16401676
{
1641-
path: ['$.type[*]'],
1677+
path: [
1678+
'$.credentialSchema[*].id'
1679+
],
16421680
filter: {
16431681
type: 'string',
1644-
const: 'KnownCustomerCredential',
1645-
},
1682+
const: 'https://vc.schemas.host/kcc.schema.json'
1683+
}
16461684
},
16471685
{
16481686
path: ['$.issuer'],
@@ -1735,11 +1773,13 @@ export const offeringDataUSDToMXN: OfferingData = {
17351773
constraints: {
17361774
fields: [
17371775
{
1738-
path: ['$.type[*]'],
1776+
path: [
1777+
'$.credentialSchema[*].id'
1778+
],
17391779
filter: {
17401780
type: 'string',
1741-
const: 'KnownCustomerCredential',
1742-
},
1781+
const: 'https://vc.schemas.host/kcc.schema.json'
1782+
}
17431783
},
17441784
{
17451785
path: ['$.issuer'],

0 commit comments

Comments
 (0)