@@ -47,6 +47,70 @@ export const sampleCredential1 = {
47
47
} ,
48
48
} ;
49
49
50
+ export const sampleCredential2 = {
51
+ version : "v0" ,
52
+ witness : {
53
+ type : "simple" ,
54
+ issuer : {
55
+ _type : "PublicKey" ,
56
+ value : "B62qqRryvaLH99vsPx6kL8cuWFq2AZZsDjaQftab4hpGA5Du3Jju6kP" ,
57
+ } ,
58
+ issuerSignature : {
59
+ _type : "Signature" ,
60
+ value : {
61
+ r : "18608032094363426526383612175861105396636219252290095846645842383039012234860" ,
62
+ s : "16614231870158121751259974049410646935461628042855821394498854808344556066615" ,
63
+ } ,
64
+ } ,
65
+ } ,
66
+ credential : {
67
+ owner : {
68
+ _type : "PublicKey" ,
69
+ value : "B62qqBvUfKppzx3omv5g9YSooRuqA3YVG5zq4j33tN2THA6tGc7JUij" ,
70
+ } ,
71
+ data : {
72
+ age : { _type : "Field" , value : "18" } ,
73
+ name : {
74
+ _type : "Bytes" ,
75
+ value :
76
+ "416c696365000000000000000000000000000000000000000000000000000000" ,
77
+ } ,
78
+ } ,
79
+ } ,
80
+ } ;
81
+
82
+ export const sampleCredential3 = {
83
+ version : "v0" ,
84
+ witness : {
85
+ type : "simple" ,
86
+ issuer : {
87
+ _type : "PublicKey" ,
88
+ value : "B62qipmSo9Bju1XPtHfH8ukLWSMgur6e2xiUcfzbqwKEMdzSfQNbfbS" ,
89
+ } ,
90
+ issuerSignature : {
91
+ _type : "Signature" ,
92
+ value : {
93
+ r : "15369596967930537948249866433896467790855310091967164859503093172192059176638" ,
94
+ s : "18498891580394813079080734274552796309574738769075217343428610783674309728163" ,
95
+ } ,
96
+ } ,
97
+ } ,
98
+ credential : {
99
+ owner : {
100
+ _type : "PublicKey" ,
101
+ value : "B62qrVPwPbeogxQKzPcV5dTSTmNo39g1T2hAM19cJ5Dtwk1p4STmKAE" ,
102
+ } ,
103
+ data : {
104
+ age : { _type : "Field" , value : "18" } ,
105
+ name : {
106
+ _type : "Bytes" ,
107
+ value :
108
+ "416c696365000000000000000000000000000000000000000000000000000000" ,
109
+ } ,
110
+ } ,
111
+ } ,
112
+ } ;
113
+
50
114
export const samplePresentationRequest = {
51
115
type : "zk-app" ,
52
116
spec : {
@@ -151,3 +215,100 @@ export const samplePresentationRequest = {
151
215
action : { _type : "Field" , value : "123" } ,
152
216
} ,
153
217
} ;
218
+
219
+ export const samplePresentationRequest1 = {
220
+ type : "https" ,
221
+ spec : {
222
+ inputs : {
223
+ signedData : {
224
+ type : "credential" ,
225
+ credentialType : "simple" ,
226
+ witness : {
227
+ type : { type : "Constant" , value : "simple" } ,
228
+ issuer : { _type : "PublicKey" } ,
229
+ issuerSignature : { _type : "Signature" } ,
230
+ } ,
231
+ data : { age : { _type : "Field" } , name : { _type : "Bytes" , size : 32 } } ,
232
+ } ,
233
+ targetAge : { type : "claim" , data : { _type : "Field" } } ,
234
+ targetName : {
235
+ type : "constant" ,
236
+ data : { _type : "Bytes" , size : 32 } ,
237
+ value :
238
+ "416c696365000000000000000000000000000000000000000000000000000000" ,
239
+ } ,
240
+ } ,
241
+ logic : {
242
+ assert : {
243
+ type : "and" ,
244
+ inputs : [
245
+ {
246
+ type : "equals" ,
247
+ left : {
248
+ type : "property" ,
249
+ key : "age" ,
250
+ inner : {
251
+ type : "property" ,
252
+ key : "data" ,
253
+ inner : {
254
+ type : "property" ,
255
+ key : "signedData" ,
256
+ inner : { type : "root" } ,
257
+ } ,
258
+ } ,
259
+ } ,
260
+ right : {
261
+ type : "property" ,
262
+ key : "targetAge" ,
263
+ inner : { type : "root" } ,
264
+ } ,
265
+ } ,
266
+ {
267
+ type : "equals" ,
268
+ left : {
269
+ type : "property" ,
270
+ key : "name" ,
271
+ inner : {
272
+ type : "property" ,
273
+ key : "data" ,
274
+ inner : {
275
+ type : "property" ,
276
+ key : "signedData" ,
277
+ inner : { type : "root" } ,
278
+ } ,
279
+ } ,
280
+ } ,
281
+ right : {
282
+ type : "property" ,
283
+ key : "targetName" ,
284
+ inner : { type : "root" } ,
285
+ } ,
286
+ } ,
287
+ ] ,
288
+ } ,
289
+ outputClaim : {
290
+ type : "property" ,
291
+ key : "age" ,
292
+ inner : {
293
+ type : "property" ,
294
+ key : "data" ,
295
+ inner : {
296
+ type : "property" ,
297
+ key : "signedData" ,
298
+ inner : { type : "root" } ,
299
+ } ,
300
+ } ,
301
+ } ,
302
+ } ,
303
+ } ,
304
+ claims : { targetAge : { _type : "Field" , value : "18" } } ,
305
+ inputContext : {
306
+ type : "https" ,
307
+ serverNonce : {
308
+ _type : "Field" ,
309
+ value :
310
+ "4343919140832211358170758874350867217600871707216240107166052913905177631127" ,
311
+ } ,
312
+ action : "POST /api/verify" ,
313
+ } ,
314
+ } ;
0 commit comments