+ SignKey
This commit is contained in:
parent
4a1c8f61ab
commit
1830f25ca6
1 changed files with 28 additions and 0 deletions
28
src/api.ml
28
src/api.ml
|
|
@ -884,3 +884,31 @@ module AuditorKeys = struct
|
||||||
~enc:denomination_keys
|
~enc:denomination_keys
|
||||||
|> finish
|
|> finish
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module SignKey = struct
|
||||||
|
type t = {
|
||||||
|
key: EddsaPublicKey.t;
|
||||||
|
stamp_start: Timestamp.t;
|
||||||
|
stamp_expire: Timestamp.t;
|
||||||
|
stamp_end: Timestamp.t;
|
||||||
|
master_sig: ExchangeSigningKeyValidityPS.t;
|
||||||
|
}
|
||||||
|
|
||||||
|
let jsont =
|
||||||
|
let make key stamp_start stamp_expire stamp_end master_sig =
|
||||||
|
{ key; stamp_start; stamp_expire; stamp_end; master_sig }
|
||||||
|
in
|
||||||
|
let key v = v.key in
|
||||||
|
let stamp_start v = v.stamp_start in
|
||||||
|
let stamp_expire v = v.stamp_expire in
|
||||||
|
let stamp_end v = v.stamp_end in
|
||||||
|
let master_sig v = v.master_sig in
|
||||||
|
let open Jsont.Object in
|
||||||
|
map ~kind:"SignKey" make
|
||||||
|
|> mem "key" EddsaPublicKey.jsont ~enc:key
|
||||||
|
|> mem "stamp_start" Timestamp.jsont ~enc:stamp_start
|
||||||
|
|> mem "stamp_expire" Timestamp.jsont ~enc:stamp_expire
|
||||||
|
|> mem "stamp_end" Timestamp.jsont ~enc:stamp_end
|
||||||
|
|> mem "master_sig" ExchangeSigningKeyValidityPS.jsont ~enc:master_sig
|
||||||
|
|> finish
|
||||||
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue