add time.ml, similar to libgnunetutil's
This commit is contained in:
parent
b507d540ad
commit
5392bafddf
17 changed files with 336 additions and 321 deletions
24
src/api.ml
24
src/api.ml
|
|
@ -567,9 +567,9 @@ module GlobalFees = struct
|
|||
history_fee: Amount.t;
|
||||
account_fee: Amount.t;
|
||||
purse_fee: Amount.t;
|
||||
history_expiration: Timestamp.Span.t;
|
||||
history_expiration: Time.Relative.t;
|
||||
purse_account_limit: int32;
|
||||
purse_timeout: Timestamp.Span.t;
|
||||
purse_timeout: Time.Relative.t;
|
||||
master_sig: GlobalFees.t;
|
||||
}
|
||||
|
||||
|
|
@ -603,9 +603,9 @@ module GlobalFees = struct
|
|||
|> mem "history_fee" Amount.jsont ~enc:history_fee
|
||||
|> mem "account_fee" Amount.jsont ~enc:account_fee
|
||||
|> mem "purse_fee" Amount.jsont ~enc:purse_fee
|
||||
|> mem "history_expiration" Timestamp.Span.jsont ~enc:history_expiration
|
||||
|> mem "history_expiration" Time.Relative.jsont ~enc:history_expiration
|
||||
|> mem "purse_account_limit" Jsont.int32 ~enc:purse_account_limit
|
||||
|> mem "purse_timeout" Timestamp.Span.jsont ~enc:purse_timeout
|
||||
|> mem "purse_timeout" Time.Relative.jsont ~enc:purse_timeout
|
||||
|> mem "master_sig" GlobalFees.jsont ~enc:master_sig
|
||||
|> finish
|
||||
end
|
||||
|
|
@ -751,7 +751,7 @@ module ExchangePartnerSetupRequest = struct
|
|||
type t = {
|
||||
partner_base_url: string;
|
||||
partner_pub: EddsaPublicKey.t;
|
||||
wad_frequency: Timestamp.Span.t;
|
||||
wad_frequency: Time.Relative.t;
|
||||
master_sig: PartnerConfiguration.t;
|
||||
start_date: Timestamp.t;
|
||||
end_date: Timestamp.t;
|
||||
|
|
@ -781,7 +781,7 @@ module ExchangePartnerSetupRequest = struct
|
|||
map ~kind:"ExchangePartnerSetupRequest" make
|
||||
|> mem "partner_base_url" Jsont.string ~enc:partner_base_url
|
||||
|> mem "partner_pub" EddsaPublicKey.jsont ~enc:partner_pub
|
||||
|> mem "wad_frequency" Timestamp.Span.jsont ~enc:wad_frequency
|
||||
|> mem "wad_frequency" Time.Relative.jsont ~enc:wad_frequency
|
||||
|> mem "master_sig" PartnerConfiguration.jsont ~enc:master_sig
|
||||
|> mem "start_date" Timestamp.jsont ~enc:start_date
|
||||
|> mem "end_date" Timestamp.jsont ~enc:end_date
|
||||
|
|
@ -796,7 +796,7 @@ module ExchangePartnerListEntry = struct
|
|||
partner_base_url: string;
|
||||
partner_master_pub: EddsaPublicKey.t;
|
||||
wad_fee: Amount.t;
|
||||
wad_frequency: Timestamp.Span.t;
|
||||
wad_frequency: Time.Relative.t;
|
||||
start_date: Timestamp.t;
|
||||
end_date: Timestamp.t;
|
||||
master_sig: WadPartnerSignature.t;
|
||||
|
|
@ -826,7 +826,7 @@ module ExchangePartnerListEntry = struct
|
|||
|> mem "partner_base_url" Jsont.string ~enc:partner_base_url
|
||||
|> mem "partner_master_pub" EddsaPublicKey.jsont ~enc:partner_master_pub
|
||||
|> mem "wad_fee" Amount.jsont ~enc:wad_fee
|
||||
|> mem "wad_frequency" Timestamp.Span.jsont ~enc:wad_frequency
|
||||
|> mem "wad_frequency" Time.Relative.jsont ~enc:wad_frequency
|
||||
|> mem "start_date" Timestamp.jsont ~enc:start_date
|
||||
|> mem "end_date" Timestamp.jsont ~enc:end_date
|
||||
|> mem "master_sig" WadPartnerSignature.jsont ~enc:master_sig
|
||||
|
|
@ -1045,7 +1045,7 @@ end
|
|||
module AccountLimit = struct
|
||||
type t = {
|
||||
operation_type: Account_operation.t;
|
||||
timeframe: Timestamp.Span.t;
|
||||
timeframe: Time.Relative.t;
|
||||
threshold: Amount.t;
|
||||
soft_limit: bool option;
|
||||
}
|
||||
|
|
@ -1060,7 +1060,7 @@ module AccountLimit = struct
|
|||
let soft_limit v = v.soft_limit in
|
||||
map ~kind:"AccountLimit" make
|
||||
|> mem "operation_type" Account_operation.jsont ~enc:operation_type
|
||||
|> mem "timeframe" Timestamp.Span.jsont ~enc:timeframe
|
||||
|> mem "timeframe" Time.Relative.jsont ~enc:timeframe
|
||||
|> mem "threshold" Amount.jsont ~enc:threshold
|
||||
|> opt_mem "soft_limit" Jsont.bool ~enc:soft_limit
|
||||
|> finish
|
||||
|
|
@ -1208,7 +1208,7 @@ module ExchangeKeysResponse = struct
|
|||
kyc_enabled: bool;
|
||||
disable_direct_deposit: bool;
|
||||
master_public_key: EddsaPublicKey.t;
|
||||
reserve_closing_delay: Timestamp.Span.t;
|
||||
reserve_closing_delay: Time.Relative.t;
|
||||
wallet_balance_limit_without_kyc: Amount.t list option;
|
||||
hard_limits: AccountLimit.t list;
|
||||
zero_limits: ZeroLimitedOperation.t list;
|
||||
|
|
@ -1335,7 +1335,7 @@ module ExchangeKeysResponse = struct
|
|||
|> mem "kyc_enabled" Jsont.bool ~enc:kyc_enabled
|
||||
|> mem "disable_direct_deposit" Jsont.bool ~enc:disable_direct_deposit
|
||||
|> mem "master_public_key" EddsaPublicKey.jsont ~enc:master_public_key
|
||||
|> mem "reserve_closing_delay" Timestamp.Span.jsont
|
||||
|> mem "reserve_closing_delay" Time.Relative.jsont
|
||||
~enc:reserve_closing_delay
|
||||
|> opt_mem "wallet_balance_limit_without_kyc" (Jsont.list Amount.jsont)
|
||||
~enc:wallet_balance_limit_without_kyc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue