@@ -206,6 +206,7 @@ impl fmt::Debug for ClaimAssertion {
206
206
// Claim field names
207
207
const CLAIM_GENERATOR_F : & str = "claim_generator" ;
208
208
const CLAIM_GENERATOR_INFO_F : & str = "claim_generator_info" ;
209
+ const CLAIM_GENERATOR_HINTS_F : & str = "claim_generator_hints" ;
209
210
const SIGNATURE_F : & str = "signature" ;
210
211
const ASSERTIONS_F : & str = "assertions" ;
211
212
const DC_FORMAT_F : & str = "dc:format" ;
@@ -495,6 +496,7 @@ impl Claim {
495
496
if claim_version == 1 {
496
497
/* Claim V1 fields
497
498
"claim_generator": tstr,
499
+ "claim_generator_hints",
498
500
"claim_generator_info": [1* generator-info-map],
499
501
"signature": jumbf-uri-type,
500
502
"assertions": [1* $hashed-uri-map],
@@ -507,8 +509,9 @@ impl Claim {
507
509
? "metadata": $assertion-metadata-map,
508
510
*/
509
511
510
- static V1_FIELDS : [ & str ; 11 ] = [
512
+ static V1_FIELDS : [ & str ; 12 ] = [
511
513
CLAIM_GENERATOR_F ,
514
+ CLAIM_GENERATOR_HINTS_F ,
512
515
CLAIM_GENERATOR_INFO_F ,
513
516
SIGNATURE_F ,
514
517
ASSERTIONS_F ,
@@ -535,9 +538,6 @@ impl Claim {
535
538
536
539
let claim_generator: String =
537
540
map_cbor_to_type ( CLAIM_GENERATOR_F , & claim_value) . ok_or ( Error :: ClaimDecoding ) ?;
538
- let claim_generator_info: Vec < ClaimGeneratorInfo > =
539
- map_cbor_to_type ( CLAIM_GENERATOR_INFO_F , & claim_value) . unwrap_or_default ( ) ;
540
-
541
541
let signature: String =
542
542
map_cbor_to_type ( SIGNATURE_F , & claim_value) . ok_or ( Error :: ClaimDecoding ) ?;
543
543
let assertions: Vec < HashedUri > =
@@ -548,6 +548,10 @@ impl Claim {
548
548
map_cbor_to_type ( INSTANCE_ID_F , & claim_value) . ok_or ( Error :: ClaimDecoding ) ?;
549
549
550
550
// optional V1 fields
551
+ let claim_generator_info: Option < Vec < ClaimGeneratorInfo > > =
552
+ map_cbor_to_type ( CLAIM_GENERATOR_INFO_F , & claim_value) ;
553
+ let claim_generator_hints: Option < HashMap < String , Value > > =
554
+ map_cbor_to_type ( CLAIM_GENERATOR_HINTS_F , & claim_value) ;
551
555
let title: Option < String > = map_cbor_to_type ( DC_TITLE_F , & claim_value) ;
552
556
let redacted_assertions: Option < Vec < String > > =
553
557
map_cbor_to_type ( REDACTED_ASSERTIONS_F , & claim_value) ;
@@ -568,15 +572,15 @@ impl Claim {
568
572
assertion_store : Vec :: new ( ) ,
569
573
vc_store : Vec :: new ( ) ,
570
574
claim_generator : Some ( claim_generator) ,
571
- claim_generator_info : Some ( claim_generator_info ) ,
575
+ claim_generator_info,
572
576
signature,
573
577
assertions,
574
578
original_bytes : Some ( data. to_owned ( ) ) ,
575
579
original_box_order : None ,
576
580
redacted_assertions,
577
581
alg,
578
582
alg_soft,
579
- claim_generator_hints : None ,
583
+ claim_generator_hints,
580
584
metadata,
581
585
data_boxes : Vec :: new ( ) ,
582
586
claim_version,
0 commit comments