add revoked_sig option to sk/dn_data

This commit is contained in:
swrup 2025-12-21 20:06:01 +01:00
parent 8f433fcb28
commit 9a68d18a1d
7 changed files with 45 additions and 39 deletions

View file

@ -43,11 +43,22 @@ include struct
let planchets_hash = HashPlanchetsP.caqti
end
(* TODO revoked_sig
revoked_sig default to None, but could actually be revoked
always do a LEFT JOIN on signkey_revocations table? *)
let signkey_data =
let master_sig = Bin_sig.ExchangeSigningKeyValidity.caqti in
custom
~encode:(fun
Signkey_data.{ pub; stamp_start; stamp_expire; stamp_end; master_sig }
Signkey_data.
{
pub;
stamp_start;
stamp_expire;
stamp_end;
master_sig;
revoked_sig= _;
}
->
match master_sig with
| None -> Error "signkey_data master_sig is none"
@ -61,6 +72,7 @@ let signkey_data =
stamp_expire;
stamp_end;
master_sig= Some master_sig;
revoked_sig= None;
})
(t5 eddsa_pub time time time master_sig)
@ -83,6 +95,7 @@ let denom_data =
age_mask;
h_pub;
master_sig;
revoked_sig= _;
}
->
match master_sig with
@ -130,6 +143,7 @@ let denom_data =
age_mask;
h_pub;
master_sig= Some master_sig;
revoked_sig= None;
})
(t12 rsa_pub amount time time time time amount amount amount amount int
(t2 denomination_hash master_sig))