From 0722c0294648afb1dfbf49054ba88395e8d8a0ea Mon Sep 17 00:00:00 2001 From: swrup Date: Sat, 15 Nov 2025 22:20:18 +0100 Subject: [PATCH] --- include/config_types.ml | 7 ++ include/db.ml | 221 ++++++++++++++++++++++++++++++++++++++++ include/dune | 9 ++ 3 files changed, 237 insertions(+) create mode 100644 include/config_types.ml create mode 100644 include/db.ml diff --git a/include/config_types.ml b/include/config_types.ml new file mode 100644 index 00000000..f3175850 --- /dev/null +++ b/include/config_types.ml @@ -0,0 +1,7 @@ +module type Exchangedb = sig + val idle_reserve_expiration_time : Ptime.Span.t + val legal_reserve_expiration_time : Ptime.Span.t + val aggregator_shift : Ptime.Span.t + val default_purse_limit : int + val max_aml_program_runtime : Ptime.Span.t +end diff --git a/include/db.ml b/include/db.ml new file mode 100644 index 00000000..528f7f19 --- /dev/null +++ b/include/db.ml @@ -0,0 +1,221 @@ +(* +let not_implemented () = assert false + +(* -- *) +let cls = not_implemented +let do_reserve_open = not_implemented +let drop_tables = not_implemented +let free_coin_transaction_list = not_implemented +let free_reserve_history = not_implemented +let get_coin_transactions = not_implemented +let get_expired_reserves = not_implemented +let get_purse_request = not_implemented +let get_reserve_history = not_implemented +let get_unfinished_close_requests = not_implemented +let insert_records_by_table = not_implemented +let insert_reserve_open_deposit = not_implemented +let insert_close_request = not_implemented +let delete_aggregation_transient = not_implemented +let iterate_reserve_close_info = not_implemented +let iterate_kyc_reference = not_implemented +let lookup_records_by_table = not_implemented +let lookup_serial_by_table = not_implemented +let select_account_merges_above_serial_id = not_implemented +let select_all_purse_decisions_above_serial_id = not_implemented +let select_all_purse_deletions_above_serial_id = not_implemented +let select_purse = not_implemented +let select_purse_deposits_above_serial_id = not_implemented +let select_purse_merges_above_serial_id = not_implemented +let select_purse_requests_above_serial_id = not_implemented +let select_reserve_close_info = not_implemented +let select_reserve_closed_above_serial_id = not_implemented +let select_reserve_open_above_serial_id = not_implemented +let insert_purse_request = not_implemented +let iterate_active_signkeys = not_implemented +let commit = not_implemented +let preflight = not_implemented +let select_aggregation_amounts_for_kyc_check = not_implemented +let get_kyc_rules = not_implemented +let get_kyc_rules2 = not_implemented +let kyc_provider_account_lookup = not_implemented +let lookup_kyc_process_by_account = not_implemented +let update_kyc_process_by_row = not_implemented +let insert_kyc_requirement_process = not_implemented +let select_withdraw_amounts_for_kyc_check = not_implemented +let select_merge_amounts_for_kyc_check = not_implemented +let profit_drains_set_finished = not_implemented +let profit_drains_get_pending = not_implemented +let get_drain_profit = not_implemented +let get_purse_deposit = not_implemented +let insert_contract = not_implemented +let select_contract = not_implemented +let select_purse_merge = not_implemented +let select_contract_by_purse = not_implemented +let insert_drain_profit = not_implemented +let do_reserve_purse = not_implemented +let lookup_global_fee_by_time = not_implemented +let do_purse_deposit = not_implemented +let begin_revolving_shard = not_implemented +let get_extension_manifest = not_implemented +let do_purse_merge = not_implemented +let do_purse_delete = not_implemented +let start_read_committed = not_implemented +let start_read_only = not_implemented +let lookup_wire_fee_by_time = not_implemented +let start = not_implemented +let rollback = not_implemented +let create_tables = not_implemented +let event_listen = not_implemented +let event_listen_cancel = not_implemented +let event_notify = not_implemented +let lookup_rules_by_access_token = not_implemented +let reserves_get = not_implemented +let reserves_get_origin = not_implemented +let drain_kyc_alert = not_implemented +let reserves_in_insert = not_implemented +let do_withdraw = not_implemented +let get_withdraw = not_implemented +let wad_in_insert = not_implemented +let kycauth_in_insert = not_implemented +let get_policy_details = not_implemented +let persist_policy_details = not_implemented +let do_deposit = not_implemented +let get_wire_hash_for_contract = not_implemented +let add_policy_fulfillment_proof = not_implemented +let do_refresh = not_implemented +let do_refund = not_implemented +let do_recoup = not_implemented +let do_recoup_refresh = not_implemented +let get_reserve_balance = not_implemented +let count_known_coins = not_implemented +let ensure_coin_known = not_implemented +let get_known_coin = not_implemented +let get_signature_for_known_coin = not_implemented +let get_coin_denomination = not_implemented +let have_deposit2 = not_implemented +let aggregate = not_implemented +let create_aggregation_transient = not_implemented +let select_aggregation_transient = not_implemented +let find_aggregation_transient = not_implemented +let update_aggregation_transient = not_implemented +let get_ready_deposit = not_implemented +let insert_refund = not_implemented +let select_refunds_by_coin = not_implemented +let select_aml_measures = not_implemented +let get_refresh = not_implemented +let lookup_wire_transfer = not_implemented +let lookup_transfer_by_deposit = not_implemented +let insert_wire_fee = not_implemented +let insert_global_fee = not_implemented +let get_wire_fee = not_implemented +let get_global_fee = not_implemented +let get_global_fees = not_implemented +let insert_reserve_closed = not_implemented +let wire_prepare_data_insert = not_implemented +let wire_prepare_data_mark_finished = not_implemented +let wire_prepare_data_mark_failed = not_implemented +let wire_prepare_data_get = not_implemented +let start_deferred_wire_out = not_implemented +let store_wire_transfer_out = not_implemented +let gc = not_implemented +let select_coin_deposits_above_serial_id = not_implemented +let lookup_aml_history = not_implemented +let lookup_kyc_history = not_implemented +let select_purse_decisions_above_serial_id = not_implemented +let select_purse_deposits_by_purse = not_implemented +let select_refreshes_above_serial_id = not_implemented +let select_refunds_above_serial_id = not_implemented +let select_reserves_in_above_serial_id = not_implemented +let select_reserves_in_above_serial_id_by_account = not_implemented +let select_withdrawals_above_serial_id = not_implemented +let select_wire_out_above_serial_id = not_implemented +let select_wire_out_above_serial_id_by_account = not_implemented +let select_recoup_above_serial_id = not_implemented +let select_recoup_refresh_above_serial_id = not_implemented +let get_reserve_by_h_planchets = not_implemented +let get_old_coin_by_h_blind = not_implemented +let select_batch_deposits_missing_wire = not_implemented +let select_aggregations_above_serial = not_implemented +let lookup_auditor_timestamp = not_implemented +let lookup_auditor_status = not_implemented +let insert_auditor = not_implemented +let lookup_wire_timestamp = not_implemented +let insert_wire = not_implemented +let update_wire = not_implemented +let get_wire_accounts = not_implemented +let get_wire_fees = not_implemented +let select_aml_decisions = not_implemented +let select_deposit_amounts_for_kyc_check = not_implemented +let do_check_deposit_idempotent = not_implemented +let select_aml_attributes = not_implemented +let select_aml_statistics = not_implemented +let lookup_completed_legitimization = not_implemented +let lookup_pending_legitimization = not_implemented +let lookup_active_legitimization = not_implemented +let insert_auditor_denom_sig = not_implemented +let select_auditor_denom_sig = not_implemented +let select_kyc_accounts = not_implemented +let lookup_h_payto_by_access_token = not_implemented +let insert_sanction_list_hit = not_implemented +let select_exchange_debit_transfers = not_implemented +let select_exchange_credit_transfers = not_implemented +let select_exchange_kycauth_transfers = not_implemented +let select_all_kyc_attributes = not_implemented +let begin_shard = not_implemented +let abort_shard = not_implemented +let insert_kyc_failure = not_implemented +let complete_shard = not_implemented +let release_revolving_shard = not_implemented +let delete_shard_locks = not_implemented +let set_extension_manifest = not_implemented +let insert_partner = not_implemented +let expire_purse = not_implemented +let select_purse_by_merge_pub = not_implemented +let set_purse_balance = not_implemented +let get_pending_kyc_requirement_process = not_implemented +let select_kyc_attributes = not_implemented +let insert_aml_officer = not_implemented +let enable_rules = not_implemented +let disable_rules = not_implemented +let test_aml_officer = not_implemented +let lookup_aml_officer = not_implemented +let insert_active_legitimization_measure = not_implemented +let insert_aml_decision = not_implemented +let lookup_kyc_requirement_by_row = not_implemented +let trigger_kyc_rule_for_account = not_implemented +let lookup_kyc_status_by_token = not_implemented +let batch_ensure_coin_known = not_implemented +let inject_auditor_triggers = not_implemented +let insert_successor_measure = not_implemented +let insert_aml_program_failure = not_implemented +let persist_kyc_attributes = not_implemented +let clear_aml_lock = not_implemented +let set_aml_lock = not_implemented +*) + +(* revocations *) +(* +let insert_signkey_revocation = not_implemented +let insert_denomination_revocation = not_implemented +let lookup_signkey_revocation = not_implemented +let get_denomination_revocation = not_implemented +*) + +(* +let insert_denomination_info = not_implemented +let get_denomination_info = not_implemented +let get_denomination_by_serial = not_implemented +let iterate_denomination_info = not_implemented +let iterate_denominations = not_implemented +*) + +module type S = sig end + +module Make (Db_config : Config_types.Exchangedb) = struct +(* db actions needed for a minimal /management *) +let activate_signing_key = not_implemented +let add_denomination_key = not_implemented +let lookup_signing_key = not_implemented +let lookup_denomination_key = not_implemented + +end diff --git a/include/dune b/include/dune index d9601600..8e446851 100644 --- a/include/dune +++ b/include/dune @@ -4,6 +4,15 @@ (modules taler_signatures) (libraries)) +(library + (name db) + ; (wrapped false) + (modules db config_types) + (libraries + ptime + ; amount + )) + (executable (name gen_taler_signatures) (modules gen_taler_signatures)