+ exchangedb-postgres

This commit is contained in:
swrup 2025-11-20 20:30:41 +01:00
parent 51007ff612
commit 9994385179
3 changed files with 10 additions and 1 deletions

View file

@ -51,6 +51,9 @@ aggregator_shift = "1 year"
max_aml_program_runtime = "1 year"
default_purse_limit = 9999
[exchangedb-postgres]
config = "pgx://mte:hunter2@localhost:5432/taler-exchange"
[coin_kudo_1]
value= EUR:0.01
duration_withdraw= "1 year"

View file

@ -17,7 +17,7 @@
(executable
(name parse_config)
(modules parse_config)
(libraries mirage-crypto-ec ptime fmt angstrom amount b32))
(libraries mirage-crypto-ec ptime fmt angstrom uri amount b32))
; we prefer to generate taler_signatures.ml once,
; and commit it, for versionning:

View file

@ -225,6 +225,7 @@ let yes_no = function
| "YES" -> `YES
| s -> fail_with (Fmt.str "expected `YES`/`NO` value, got `%s`" s)
let uri s = Uri.of_string s
let amount s = s |> Amount.of_string |> unwrap_res
let duration s = Parse_duration.(s |> parse |> to_ptime_span)
@ -356,6 +357,11 @@ module Config = struct
let default_purse_limit = get "default_purse_limit" |> int
end
module Exchangedb_postgres = struct
let config =
get config ~section:"exchangedb-postgres" ~field:"config" |> uri
end
module Currency = struct
type t = {
enabled: [ `YES | `NO ];