This commit is contained in:
parent
a99eefc9e5
commit
e3119822f8
2 changed files with 91 additions and 1 deletions
|
|
@ -16,6 +16,8 @@ module Config = struct
|
||||||
supported, according to DD we take text/plain as default instead for now *)
|
supported, according to DD we take text/plain as default instead for now *)
|
||||||
let default_mimetype = ("text", "plain")
|
let default_mimetype = ("text", "plain")
|
||||||
let default_extension = ".txt"
|
let default_extension = ".txt"
|
||||||
|
|
||||||
|
(*
|
||||||
let terms_dir = Fpath.(v "terms")
|
let terms_dir = Fpath.(v "terms")
|
||||||
let privacy_dir = Fpath.(v "privacy")
|
let privacy_dir = Fpath.(v "privacy")
|
||||||
|
|
||||||
|
|
@ -23,6 +25,7 @@ module Config = struct
|
||||||
not generate it and we do not verify it *)
|
not generate it and we do not verify it *)
|
||||||
let terms_etag = "0" |> Headers_lib.Etag.of_crockford32 |> Result.get_ok
|
let terms_etag = "0" |> Headers_lib.Etag.of_crockford32 |> Result.get_ok
|
||||||
let privacy_etag = "0" |> Headers_lib.Etag.of_crockford32 |> Result.get_ok
|
let privacy_etag = "0" |> Headers_lib.Etag.of_crockford32 |> Result.get_ok
|
||||||
|
*)
|
||||||
let terms_legal_version = "1"
|
let terms_legal_version = "1"
|
||||||
let privacy_legal_version = "1"
|
let privacy_legal_version = "1"
|
||||||
end
|
end
|
||||||
|
|
@ -65,7 +68,7 @@ type t =
|
||||||
| Privacy
|
| Privacy
|
||||||
|
|
||||||
let etag = function
|
let etag = function
|
||||||
| Terms -> Config.terms_etag
|
| Terms -> Config.Exchange.terms_etag
|
||||||
| Privacy -> Config.privacy_etag
|
| Privacy -> Config.privacy_etag
|
||||||
|
|
||||||
let legal_version = function
|
let legal_version = function
|
||||||
|
|
|
||||||
87
src/config.ml
Normal file
87
src/config.ml
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
(* hardcoded config for now *)
|
||||||
|
|
||||||
|
let amount s = Amount.of_string s |> Result.get_ok
|
||||||
|
|
||||||
|
module Exchange = struct
|
||||||
|
let currency = "EUR"
|
||||||
|
let currency_round_unit = amount "EUR:0.01"
|
||||||
|
let db = "postgres"
|
||||||
|
let attribute_encryption_key = "uhuhg" (* high-entropy nonce. *)
|
||||||
|
let port = 3696
|
||||||
|
let master_public_key = "uhuhg"
|
||||||
|
let stefan_abs = amount "EUR:0.00"
|
||||||
|
let stefan_log = amount "EUR:0.00"
|
||||||
|
let stefan_lin = 0.0
|
||||||
|
let signkey_legal_duration = 99999999
|
||||||
|
let max_keys_caching = 9999999
|
||||||
|
let max_requests = 99999999
|
||||||
|
let terms_dir = Fpath.(v "terms")
|
||||||
|
let terms_etag = "0" |> Headers_lib.Etag.of_crockford32 |> Result.get_ok
|
||||||
|
let privacy_dir = Fpath.(v "privacy")
|
||||||
|
let privacy_etag = "0" |> Headers_lib.Etag.of_crockford32 |> Result.get_ok
|
||||||
|
let enable_kyc = `NO
|
||||||
|
end
|
||||||
|
|
||||||
|
type currency = {
|
||||||
|
enabled: [ `YES | `NO ];
|
||||||
|
code: string;
|
||||||
|
name: string;
|
||||||
|
fractional_input_digits: int;
|
||||||
|
fractional_normal_digits: int;
|
||||||
|
fractional_trailing_zero_digits: int;
|
||||||
|
alt_unit_names: (int * string) list;
|
||||||
|
}
|
||||||
|
|
||||||
|
let currency_eur =
|
||||||
|
{
|
||||||
|
enabled= `NO;
|
||||||
|
code= "EUR";
|
||||||
|
name= "euro";
|
||||||
|
fractional_input_digits= 2;
|
||||||
|
fractional_normal_digits= 2;
|
||||||
|
fractional_trailing_zero_digits= 2;
|
||||||
|
alt_unit_names= [ (0, "E"); (3, "kE") ];
|
||||||
|
}
|
||||||
|
|
||||||
|
module Secmod_rsa = struct
|
||||||
|
let lookahead_sign = 9999999
|
||||||
|
let overlap_duration = 9999999
|
||||||
|
let sm_priv_key = Fpath.(v "rsa_key.priv")
|
||||||
|
let key_dir = Fpath.(v "rsa")
|
||||||
|
end
|
||||||
|
|
||||||
|
module Secmod_eddsa = struct
|
||||||
|
let lookahead_sign = 9999999
|
||||||
|
let overlap_duration = 9999999
|
||||||
|
let sm_priv_key = Fpath.(v "eddsa_key.priv")
|
||||||
|
let key_dir = Fpath.(v "eddsa")
|
||||||
|
end
|
||||||
|
|
||||||
|
type coin = {
|
||||||
|
value: Amount.t;
|
||||||
|
duration_withdraw: int;
|
||||||
|
duration_spend: int;
|
||||||
|
duration_legal: int;
|
||||||
|
fee_withdraw: Amount.t;
|
||||||
|
fee_deposit: Amount.t;
|
||||||
|
fee_refresh: Amount.t;
|
||||||
|
fee_refund: Amount.t;
|
||||||
|
cipher: [ (* `CS |*) `RSA ];
|
||||||
|
rsa_keysize: int option (*only if `RSA *);
|
||||||
|
age_restricted: [ (*`YES|*) `NO ];
|
||||||
|
}
|
||||||
|
|
||||||
|
let coin_kudo =
|
||||||
|
{
|
||||||
|
value= amount "EUR:0.01";
|
||||||
|
duration_withdraw= 999999;
|
||||||
|
duration_spend= 999999;
|
||||||
|
duration_legal= 999999;
|
||||||
|
fee_withdraw= amount "EUR:0.00";
|
||||||
|
fee_deposit= amount "EUR:0.00";
|
||||||
|
fee_refresh= amount "EUR:0.00";
|
||||||
|
fee_refund= amount "EUR:0.00";
|
||||||
|
cipher= `RSA;
|
||||||
|
rsa_keysize= Some 2048;
|
||||||
|
age_restricted= `NO;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue