wip secmod

This commit is contained in:
swrup 2025-10-16 08:23:40 +02:00
parent 592ebee9a3
commit b27ebea6ee
8 changed files with 153 additions and 109 deletions

View file

@ -22,26 +22,17 @@ module Exchange = struct
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") ];
}
Types.Config_types.Currency.
{
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
@ -57,31 +48,21 @@ module Secmod_eddsa = struct
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_1 =
Types.Config_types.Coin.
{
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;
}
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;
}
let coin_kudo_2 = { coin_kudo_1 with value= amount "EUR:0.02" }
let coins = [ coin_kudo_1; coin_kudo_2 ]