From 9daf2fd170d150f1c31ab0b9264d461f5edcec42 Mon Sep 17 00:00:00 2001 From: swrup Date: Mon, 6 Oct 2025 22:26:50 +0200 Subject: [PATCH] add signatures.ml --- src/signatures.ml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/signatures.ml diff --git a/src/signatures.ml b/src/signatures.ml new file mode 100644 index 00000000..9db5dbb2 --- /dev/null +++ b/src/signatures.ml @@ -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