This commit is contained in:
swrup 2026-02-23 09:21:16 +01:00
parent 832aba52f4
commit d79f28ceb2

View file

@ -103,15 +103,17 @@ let mk_keys ~db_conn (module Keys : Keys.S) ~last_issue_date =
|> List.map Api.SignKey.of_signkey |> List.map Api.SignKey.of_signkey
in in
let exchange_pub =
(* the eddsa pub key used to sign exchange_sig *) (* the eddsa pub key used to sign exchange_sig *)
let* exchange_pub =
match signkeys with match signkeys with
| [] -> Fmt.failwith "exchange has no active signkey" | [] -> Fmt.error "exchange has no active signkey"
| sk :: _ -> sk.SignKey.key | sk :: _ -> Ok sk.SignKey.key
in in
let exchange_sig =
(* TODO *)
(* Compact eddsa signature over the contatentation of all of the master_sigs (* Compact eddsa signature over the contatentation of all of the master_sigs
(in reverse chronological order by group) in the arrays under "denominations" *) (in reverse chronological order by group) in the arrays under "denominations" *)
let exchange_sig =
let hc = let hc =
denom_l denom_l
|> List.map (fun dn -> dn.Denomination.master_sig) |> List.map (fun dn -> dn.Denomination.master_sig)
@ -184,9 +186,7 @@ let keys req server _env =
| [] -> Ok None | [] -> Ok None
| s :: _ -> ( | s :: _ -> (
match Int64.of_string_opt s with match Int64.of_string_opt s with
| None -> | None -> Error "invalid `?last_issue_date` query param, not an int"
Error
"invalid `?last_issue_date` query param, int_of_string failure"
| Some n -> Ok (Some (Timestamp.of_s n))) | Some n -> Ok (Some (Timestamp.of_s n)))
in in
let* v = mk_keys ~db_conn keys ~last_issue_date in let* v = mk_keys ~db_conn keys ~last_issue_date in