~
This commit is contained in:
parent
650264f21e
commit
97154764f4
17 changed files with 85 additions and 105 deletions
|
|
@ -12,8 +12,8 @@ let keys content =
|
|||
else Fmt.error "version incompatible"
|
||||
in
|
||||
|
||||
(* TODO validate ExchangeWireAccount
|
||||
need hash over json *)
|
||||
(* TODO json hash
|
||||
validate wire *)
|
||||
let* () =
|
||||
let open AggregateTransferFee in
|
||||
v.wire_fees
|
||||
|
|
@ -52,7 +52,7 @@ let keys content =
|
|||
match opt with
|
||||
| None -> Fmt.error "exchange_pub is not in signkeys list"
|
||||
| Some _sk ->
|
||||
(* TODO add a --now option?
|
||||
(* todo add a --now option if we want to validate timestamps
|
||||
let now = Timestamp.of_ptime (Ptime_clock.now ()) in
|
||||
if Signkey.is_valid_at ~timestamp:now sk then Ok ()
|
||||
else Fmt.error "exchange_pub is not valid at the current time"
|
||||
|
|
@ -129,7 +129,7 @@ let keys_cmd =
|
|||
@@
|
||||
let+ input = input in
|
||||
let* content =
|
||||
Result.bind (Fpath.of_string input) Bos.OS.File.read |> unwrap_err_msg
|
||||
Result.bind (Fpath.of_string input) Bos.OS.File.read |> unwrap_msg
|
||||
in
|
||||
keys content
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue