mv taler_signatures.ml
This commit is contained in:
parent
e966b62712
commit
0f4aa3f3f9
4 changed files with 27 additions and 26 deletions
2
src/dune
2
src/dune
|
|
@ -61,11 +61,11 @@
|
||||||
denomination
|
denomination
|
||||||
config_parser
|
config_parser
|
||||||
config
|
config
|
||||||
taler_signatures
|
|
||||||
signatures
|
signatures
|
||||||
api)
|
api)
|
||||||
(libraries
|
(libraries
|
||||||
(re_export b32)
|
(re_export b32)
|
||||||
|
(re_export taler_signature_purpose_codes)
|
||||||
;
|
;
|
||||||
angstrom
|
angstrom
|
||||||
fmt
|
fmt
|
||||||
|
|
|
||||||
4
src/include/dune
Normal file
4
src/include/dune
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
(library
|
||||||
|
(name taler_signature_purpose_codes)
|
||||||
|
(modules taler_signature_purpose_codes)
|
||||||
|
(libraries))
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
module Taler_purpose = Taler_signature_purpose_codes
|
||||||
open Time
|
open Time
|
||||||
open Hash
|
open Hash
|
||||||
|
|
||||||
|
|
@ -231,8 +232,7 @@ module DenominationKeyAnnouncement = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.sm_rsa_denomination_key
|
Purpose.make_bin Taler_purpose.sm_rsa_denomination_key @@ fun purpose ->
|
||||||
@@ fun purpose ->
|
|
||||||
record
|
record
|
||||||
(fun
|
(fun
|
||||||
_purpose h_denom_pub h_section_name anchor_time duration_withdraw ->
|
_purpose h_denom_pub h_section_name anchor_time duration_withdraw ->
|
||||||
|
|
@ -259,7 +259,7 @@ module SigningKeyAnnouncement = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.sm_signing_key @@ fun purpose ->
|
Purpose.make_bin Taler_purpose.sm_signing_key @@ fun purpose ->
|
||||||
record (fun _purpose exchange_pub anchor_time duration ->
|
record (fun _purpose exchange_pub anchor_time duration ->
|
||||||
{ exchange_pub; anchor_time; duration })
|
{ exchange_pub; anchor_time; duration })
|
||||||
|+ Purpose.field purpose
|
|+ Purpose.field purpose
|
||||||
|
|
@ -292,7 +292,7 @@ module DenominationKeyValidity = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_denomination_key_validity
|
Purpose.make_bin Taler_purpose.master_denomination_key_validity
|
||||||
@@ fun purpose ->
|
@@ fun purpose ->
|
||||||
record
|
record
|
||||||
(fun
|
(fun
|
||||||
|
|
@ -352,7 +352,7 @@ module ExchangeSigningKeyValidity = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_signing_key_validity
|
Purpose.make_bin Taler_purpose.master_signing_key_validity
|
||||||
@@ fun purpose ->
|
@@ fun purpose ->
|
||||||
record (fun _purpose start expire end_ signkey_pub ->
|
record (fun _purpose start expire end_ signkey_pub ->
|
||||||
{ start; expire; end_; signkey_pub })
|
{ start; expire; end_; signkey_pub })
|
||||||
|
|
@ -374,7 +374,7 @@ module MasterDenominationKeyRevocation = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_denomination_key_revoked
|
Purpose.make_bin Taler_purpose.master_denomination_key_revoked
|
||||||
@@ fun purpose ->
|
@@ fun purpose ->
|
||||||
record (fun _purpose h_denom_pub -> { h_denom_pub })
|
record (fun _purpose h_denom_pub -> { h_denom_pub })
|
||||||
|+ Purpose.field purpose
|
|+ Purpose.field purpose
|
||||||
|
|
@ -392,7 +392,7 @@ module MasterSigningKeyRevocation = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_signing_key_revoked
|
Purpose.make_bin Taler_purpose.master_signing_key_revoked
|
||||||
@@ fun purpose ->
|
@@ fun purpose ->
|
||||||
record (fun _purpose exchange_pub -> { exchange_pub })
|
record (fun _purpose exchange_pub -> { exchange_pub })
|
||||||
|+ Purpose.field purpose
|
|+ Purpose.field purpose
|
||||||
|
|
@ -414,7 +414,7 @@ module MasterAddAuditor = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_add_auditor @@ fun purpose ->
|
Purpose.make_bin Taler_purpose.master_add_auditor @@ fun purpose ->
|
||||||
record (fun _purpose start_date auditor_pub h_auditor_url ->
|
record (fun _purpose start_date auditor_pub h_auditor_url ->
|
||||||
{ start_date; auditor_pub; h_auditor_url })
|
{ start_date; auditor_pub; h_auditor_url })
|
||||||
|+ Purpose.field purpose
|
|+ Purpose.field purpose
|
||||||
|
|
@ -437,7 +437,7 @@ module MasterDelAuditor = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_del_auditor @@ fun purpose ->
|
Purpose.make_bin Taler_purpose.master_del_auditor @@ fun purpose ->
|
||||||
record (fun _purpose end_date auditor_pub -> { end_date; auditor_pub })
|
record (fun _purpose end_date auditor_pub -> { end_date; auditor_pub })
|
||||||
|+ Purpose.field purpose
|
|+ Purpose.field purpose
|
||||||
|+ field Timestamp.bin (fun t -> t.end_date)
|
|+ field Timestamp.bin (fun t -> t.end_date)
|
||||||
|
|
@ -465,7 +465,7 @@ module GlobalFees = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_global_fees @@ fun purpose ->
|
Purpose.make_bin Taler_purpose.master_global_fees @@ fun purpose ->
|
||||||
record
|
record
|
||||||
(fun
|
(fun
|
||||||
_purpose
|
_purpose
|
||||||
|
|
@ -515,7 +515,7 @@ module MasterWireDetails = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_wire_details @@ fun purpose ->
|
Purpose.make_bin Taler_purpose.master_wire_details @@ fun purpose ->
|
||||||
record
|
record
|
||||||
(fun
|
(fun
|
||||||
_purpose
|
_purpose
|
||||||
|
|
@ -554,7 +554,7 @@ module MasterAddWire = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_add_wire @@ fun _purpose ->
|
Purpose.make_bin Taler_purpose.master_add_wire @@ fun _purpose ->
|
||||||
record
|
record
|
||||||
(fun
|
(fun
|
||||||
_purpose
|
_purpose
|
||||||
|
|
@ -593,7 +593,7 @@ module MasterDelWire = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_del_wire @@ fun _purpose ->
|
Purpose.make_bin Taler_purpose.master_del_wire @@ fun _purpose ->
|
||||||
record (fun _purpose end_date h_wire -> { end_date; h_wire })
|
record (fun _purpose end_date h_wire -> { end_date; h_wire })
|
||||||
|+ Purpose.field _purpose
|
|+ Purpose.field _purpose
|
||||||
|+ field Timestamp.bin (fun t -> t.end_date)
|
|+ field Timestamp.bin (fun t -> t.end_date)
|
||||||
|
|
@ -617,7 +617,7 @@ module MasterDrainProfit = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_drain_profit @@ fun _purpose ->
|
Purpose.make_bin Taler_purpose.master_drain_profit @@ fun _purpose ->
|
||||||
record (fun _purpose wtid date amount h_section h_payto ->
|
record (fun _purpose wtid date amount h_section h_payto ->
|
||||||
{ wtid; date; amount; h_section; h_payto })
|
{ wtid; date; amount; h_section; h_payto })
|
||||||
|+ Purpose.field _purpose
|
|+ Purpose.field _purpose
|
||||||
|
|
@ -644,7 +644,7 @@ module MasterAmlOfficerStatus = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_aml_key @@ fun _purpose ->
|
Purpose.make_bin Taler_purpose.master_aml_key @@ fun _purpose ->
|
||||||
record (fun _purpose change_date officer_pub h_officer_name is_active ->
|
record (fun _purpose change_date officer_pub h_officer_name is_active ->
|
||||||
{ change_date; officer_pub; h_officer_name; is_active })
|
{ change_date; officer_pub; h_officer_name; is_active })
|
||||||
|+ Purpose.field _purpose
|
|+ Purpose.field _purpose
|
||||||
|
|
@ -672,8 +672,7 @@ module PartnerConfiguration = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_partner_details
|
Purpose.make_bin Taler_purpose.master_partner_details @@ fun _purpose ->
|
||||||
@@ fun _purpose ->
|
|
||||||
record
|
record
|
||||||
(fun
|
(fun
|
||||||
_purpose
|
_purpose
|
||||||
|
|
@ -711,8 +710,7 @@ module WadPartnerSignature = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_partner_details
|
Purpose.make_bin Taler_purpose.master_partner_details @@ fun _purpose ->
|
||||||
@@ fun _purpose ->
|
|
||||||
record
|
record
|
||||||
(fun
|
(fun
|
||||||
_purpose
|
_purpose
|
||||||
|
|
@ -757,7 +755,7 @@ module MasterWireFee = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.master_wire_fees @@ fun _purpose ->
|
Purpose.make_bin Taler_purpose.master_wire_fees @@ fun _purpose ->
|
||||||
record
|
record
|
||||||
(fun _purpose h_wire_method start_date end_date wire_fee closing_fee ->
|
(fun _purpose h_wire_method start_date end_date wire_fee closing_fee ->
|
||||||
{ h_wire_method; start_date; end_date; wire_fee; closing_fee })
|
{ h_wire_method; start_date; end_date; wire_fee; closing_fee })
|
||||||
|
|
@ -792,7 +790,7 @@ module ExchangeKeyValidity = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.auditor_exchange_keys @@ fun _purpose ->
|
Purpose.make_bin Taler_purpose.auditor_exchange_keys @@ fun _purpose ->
|
||||||
record
|
record
|
||||||
(fun
|
(fun
|
||||||
_purpose
|
_purpose
|
||||||
|
|
@ -850,7 +848,7 @@ module ExchangeKeySet = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.exchange_key_set @@ fun _purpose ->
|
Purpose.make_bin Taler_purpose.exchange_key_set @@ fun _purpose ->
|
||||||
record (fun _purpose list_issue_date hc -> { list_issue_date; hc })
|
record (fun _purpose list_issue_date hc -> { list_issue_date; hc })
|
||||||
|+ Purpose.field _purpose
|
|+ Purpose.field _purpose
|
||||||
|+ field Timestamp.bin (fun t -> t.list_issue_date)
|
|+ field Timestamp.bin (fun t -> t.list_issue_date)
|
||||||
|
|
@ -876,7 +874,7 @@ module WithdrawRequest = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.wallet_reserve_withdraw @@ fun purpose ->
|
Purpose.make_bin Taler_purpose.wallet_reserve_withdraw @@ fun purpose ->
|
||||||
record
|
record
|
||||||
(fun _purpose amount fee h_planchets blinding_seed max_age_group mask ->
|
(fun _purpose amount fee h_planchets blinding_seed max_age_group mask ->
|
||||||
{ amount; fee; h_planchets; blinding_seed; max_age_group; mask })
|
{ amount; fee; h_planchets; blinding_seed; max_age_group; mask })
|
||||||
|
|
@ -899,8 +897,7 @@ module WithdrawConfirmation = struct
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let open Bin in
|
let open Bin in
|
||||||
Purpose.make_bin Taler_signatures.exchange_confirm_withdraw
|
Purpose.make_bin Taler_purpose.exchange_confirm_withdraw @@ fun purpose ->
|
||||||
@@ fun purpose ->
|
|
||||||
record (fun _purpose h_planchets noreveal_index ->
|
record (fun _purpose h_planchets noreveal_index ->
|
||||||
{ h_planchets; noreveal_index })
|
{ h_planchets; noreveal_index })
|
||||||
|+ Purpose.field purpose
|
|+ Purpose.field purpose
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue