add signatures.ml

This commit is contained in:
swrup 2025-10-06 22:26:50 +02:00
parent 46caf0b578
commit 2b9b3af452
4 changed files with 114 additions and 0 deletions

View file

@ -11,6 +11,8 @@
(libraries
base_32
;
include
;
angstrom
zarith ;
mirage-crypto

23
src/signatures.ml Normal file
View file

@ -0,0 +1,23 @@
(* https://docs.taler.net/core/api-common.html#id7 *)
module Purpose = struct
(* defined in gnunet_crypto_lib.h *)
type t = {
(* This field equals the number of bytes being signed,
namely 'sizeof (struct Data)'. *)
size: Int32.t; (* = uint32_t *)
(* This field is used to express the context in
which the signature is made, ensuring that a
signature cannot be lifted from one part of the protocol
to another. See `src/include/taler/taler_signatures.h` within the
exchange's codebase (git://taler.net/exchange). *)
purpose: Int32.t; (* = uint32_t *)
}
end
module Data = struct
type t = {
purpose: Purpose.t;
payloads: string list;
}
end