rm non-NBO Bin.t; rename time modules
This commit is contained in:
parent
7053607c72
commit
104666b7ea
13 changed files with 306 additions and 359 deletions
26
src/api.ml
26
src/api.ml
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
let protocol_version = "31:0:0"
|
||||
|
||||
open Time
|
||||
open Crypto
|
||||
open Signatures
|
||||
module DenominationHash = Hash.DenominationHash
|
||||
|
|
@ -580,9 +581,9 @@ module GlobalFees = struct
|
|||
history_fee: Amount.t;
|
||||
account_fee: Amount.t;
|
||||
purse_fee: Amount.t;
|
||||
history_expiration: Time.Relative.t;
|
||||
history_expiration: TimeRelative.t;
|
||||
purse_account_limit: int32;
|
||||
purse_timeout: Time.Relative.t;
|
||||
purse_timeout: TimeRelative.t;
|
||||
master_sig: GlobalFees.t;
|
||||
}
|
||||
|
||||
|
|
@ -616,9 +617,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" Time.Relative.jsont ~enc:history_expiration
|
||||
|> mem "history_expiration" TimeRelative.jsont ~enc:history_expiration
|
||||
|> mem "purse_account_limit" Jsont.int32 ~enc:purse_account_limit
|
||||
|> mem "purse_timeout" Time.Relative.jsont ~enc:purse_timeout
|
||||
|> mem "purse_timeout" TimeRelative.jsont ~enc:purse_timeout
|
||||
|> mem "master_sig" GlobalFees.jsont ~enc:master_sig
|
||||
|> finish
|
||||
end
|
||||
|
|
@ -762,7 +763,7 @@ module ExchangePartnerSetupRequest = struct
|
|||
type t = {
|
||||
partner_base_url: string;
|
||||
partner_pub: EddsaPublicKey.t;
|
||||
wad_frequency: Time.Relative.t;
|
||||
wad_frequency: TimeRelative.t;
|
||||
master_sig: PartnerConfiguration.t;
|
||||
start_date: Timestamp.t;
|
||||
end_date: Timestamp.t;
|
||||
|
|
@ -792,7 +793,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" Time.Relative.jsont ~enc:wad_frequency
|
||||
|> mem "wad_frequency" TimeRelative.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
|
||||
|
|
@ -807,7 +808,7 @@ module ExchangePartnerListEntry = struct
|
|||
partner_base_url: string;
|
||||
partner_master_pub: EddsaPublicKey.t;
|
||||
wad_fee: Amount.t;
|
||||
wad_frequency: Time.Relative.t;
|
||||
wad_frequency: TimeRelative.t;
|
||||
start_date: Timestamp.t;
|
||||
end_date: Timestamp.t;
|
||||
master_sig: WadPartnerSignature.t;
|
||||
|
|
@ -837,7 +838,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" Time.Relative.jsont ~enc:wad_frequency
|
||||
|> mem "wad_frequency" TimeRelative.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
|
||||
|
|
@ -1061,7 +1062,7 @@ end
|
|||
module AccountLimit = struct
|
||||
type t = {
|
||||
operation_type: Account_operation.t;
|
||||
timeframe: Time.Relative.t;
|
||||
timeframe: TimeRelative.t;
|
||||
threshold: Amount.t;
|
||||
soft_limit: bool option;
|
||||
}
|
||||
|
|
@ -1076,7 +1077,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" Time.Relative.jsont ~enc:timeframe
|
||||
|> mem "timeframe" TimeRelative.jsont ~enc:timeframe
|
||||
|> mem "threshold" Amount.jsont ~enc:threshold
|
||||
|> opt_mem "soft_limit" Jsont.bool ~enc:soft_limit
|
||||
|> finish
|
||||
|
|
@ -1224,7 +1225,7 @@ module ExchangeKeysResponse = struct
|
|||
kyc_enabled: bool;
|
||||
disable_direct_deposit: bool;
|
||||
master_public_key: EddsaPublicKey.t;
|
||||
reserve_closing_delay: Time.Relative.t;
|
||||
reserve_closing_delay: TimeRelative.t;
|
||||
wallet_balance_limit_without_kyc: Amount.t list option;
|
||||
hard_limits: AccountLimit.t list;
|
||||
zero_limits: ZeroLimitedOperation.t list;
|
||||
|
|
@ -1347,8 +1348,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" Time.Relative.jsont
|
||||
~enc:reserve_closing_delay
|
||||
|> mem "reserve_closing_delay" TimeRelative.jsont ~enc:reserve_closing_delay
|
||||
|> opt_mem "wallet_balance_limit_without_kyc" (Jsont.list Amount.jsont)
|
||||
~enc:wallet_balance_limit_without_kyc
|
||||
|> mem "hard_limits" (Jsont.list AccountLimit.jsont) ~enc:hard_limits
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue