fmt: break-separators=before; + wip Future_sign_key
This commit is contained in:
parent
68b5e6608a
commit
c991f29b28
7 changed files with 51 additions and 32 deletions
45
src/types.ml
45
src/types.ml
|
|
@ -3,8 +3,8 @@ module Error_detail = struct
|
|||
(* TODO GANA error codes
|
||||
https://git.gnunet.org/gana.git/tree/gnu-taler-error-codes/registry.rec *)
|
||||
type t = {
|
||||
code: int
|
||||
; hint: string option
|
||||
code: int;
|
||||
hint: string option;
|
||||
}
|
||||
end
|
||||
|
||||
|
|
@ -44,10 +44,10 @@ module Amount = struct
|
|||
Prefixed with '+' or '-' in certain contexts.
|
||||
When no sign is present, the amount is assumed to be positive. *)
|
||||
type t = {
|
||||
sign: [ `Plus | `Minus ] option
|
||||
; currency: [ `Eur ]
|
||||
; value: Int64.t
|
||||
; fraction: Int64.t
|
||||
sign: [ `Plus | `Minus ] option;
|
||||
currency: [ `Eur ];
|
||||
value: Int64.t;
|
||||
fraction: Int64.t;
|
||||
}
|
||||
|
||||
let make ~sign ~currency ~value ~fraction =
|
||||
|
|
@ -88,8 +88,8 @@ module Amount = struct
|
|||
let parse_sign =
|
||||
choice
|
||||
[
|
||||
char '+' *> return (Some `Plus); char '-' *> return (Some `Minus)
|
||||
; return None
|
||||
char '+' *> return (Some `Plus); char '-' *> return (Some `Minus);
|
||||
return None;
|
||||
]
|
||||
in
|
||||
let parse_currency = string "EUR" *> return `Eur in
|
||||
|
|
@ -132,7 +132,7 @@ module Eddsa = struct
|
|||
|
||||
(* EdDSA signatures are transmitted as 64-bytes base32
|
||||
binary-encoded objects with just the R and S values (base32_ binary-only). *)
|
||||
(*type signature = string*)
|
||||
type signature = string
|
||||
end
|
||||
|
||||
module Rsa = struct
|
||||
|
|
@ -152,16 +152,16 @@ end
|
|||
|
||||
module Rsa_denomination_key = struct
|
||||
type t = {
|
||||
age_mask: int
|
||||
; rsa_pub: string (* Rsa.pub *)
|
||||
age_mask: int;
|
||||
rsa_pub: string; (* Rsa.pub *)
|
||||
}
|
||||
end
|
||||
|
||||
module CS_denomination_key = struct
|
||||
(* Clause Schnorr *)
|
||||
type t = {
|
||||
age_mask: int
|
||||
; cs_pub: string
|
||||
age_mask: int;
|
||||
cs_pub: string;
|
||||
}
|
||||
end
|
||||
|
||||
|
|
@ -170,3 +170,22 @@ module Denomination_key = struct
|
|||
| Rsa of Rsa_denomination_key.t
|
||||
| CS of CS_denomination_key.t
|
||||
end
|
||||
|
||||
module Future_sign_key = struct
|
||||
type t = {
|
||||
(* The actual exchange's EdDSA signing public key *)
|
||||
key: Eddsa.pub;
|
||||
(* Initial validity date for the signing key. *)
|
||||
stamp_start: Timestamp.t;
|
||||
(* Date when the exchange will stop using the signing key, allowed to overlap
|
||||
slightly with the next signing key's validity to allow for clock skew. *)
|
||||
stamp_expire: Timestamp.t;
|
||||
(* Date when all signatures made by the signing key expire and should
|
||||
henceforth no longer be considered valid in legal disputes. *)
|
||||
stamp_end: Timestamp.t;
|
||||
(* Signature over TALER_SigningKeyAnnouncementPS
|
||||
for this signing key by the signkey security
|
||||
module using purpose TALER_SIGNATURE_SM_SIGNING_KEY. *)
|
||||
signkey_secmod_sig: Eddsa.signature;
|
||||
}
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue