wip denom caqti; section_name issue
This commit is contained in:
parent
c41ca5b4e2
commit
e870972808
4 changed files with 90 additions and 24 deletions
103
src/pg.ml
103
src/pg.ml
|
|
@ -42,6 +42,22 @@ module Caqti_type = struct
|
|||
let wire_method = Caqti_type.string
|
||||
let payto_uri = Caqti_type.string
|
||||
|
||||
include struct
|
||||
(* alias for hash *)
|
||||
|
||||
let fullpayto_hash = FullPaytoHash.caqti
|
||||
let nomalizaedpayto_hash = NormalizedPaytoHash.caqti
|
||||
let denomination_hash = DenominationHash.caqti
|
||||
let privatecontract_hash = PrivateContractHash.caqti
|
||||
let extensionspolicy_hash = ExtensionsPolicyHash.caqti
|
||||
let merchantwire_hash = MerchantWireHash.caqti
|
||||
let agecommitment_hash = AgeCommitmentHash.caqti
|
||||
let blindedcoin_hash = BlindedCoinHash.caqti
|
||||
let coinpub_hash = CoinPubHash.caqti
|
||||
let outputcommitment_hash = OutputCommitmentHash.caqti
|
||||
let planchets_hash = HashPlanchetsP.caqti
|
||||
end
|
||||
|
||||
let signkey_data =
|
||||
let master_sig = Bin_sig.ExchangeSigningKeyValidity.caqti in
|
||||
custom
|
||||
|
|
@ -63,6 +79,76 @@ module Caqti_type = struct
|
|||
})
|
||||
(t5 eddsa_pub time time time master_sig)
|
||||
|
||||
let denom_data =
|
||||
let master_sig = Bin_sig.DenominationKeyValidity.caqti in
|
||||
custom
|
||||
~encode:(fun
|
||||
Denom_data.
|
||||
{
|
||||
pub;
|
||||
value;
|
||||
stamp_start;
|
||||
stamp_expire_withdraw;
|
||||
stamp_expire_deposit;
|
||||
stamp_expire_legal;
|
||||
fee_withdraw;
|
||||
fee_deposit;
|
||||
fee_refresh;
|
||||
fee_refund;
|
||||
age_mask;
|
||||
h_pub;
|
||||
master_sig;
|
||||
}
|
||||
->
|
||||
match master_sig with
|
||||
| None -> Error "denom_data master_sig is none"
|
||||
| Some master_sig ->
|
||||
Ok
|
||||
( pub,
|
||||
value,
|
||||
stamp_start,
|
||||
stamp_expire_withdraw,
|
||||
stamp_expire_deposit,
|
||||
stamp_expire_legal,
|
||||
fee_withdraw,
|
||||
fee_deposit,
|
||||
fee_refresh,
|
||||
fee_refund,
|
||||
age_mask,
|
||||
(h_pub, master_sig) ))
|
||||
~decode:(fun
|
||||
( pub,
|
||||
value,
|
||||
stamp_start,
|
||||
stamp_expire_withdraw,
|
||||
stamp_expire_deposit,
|
||||
stamp_expire_legal,
|
||||
fee_withdraw,
|
||||
fee_deposit,
|
||||
fee_refresh,
|
||||
fee_refund,
|
||||
age_mask,
|
||||
(h_pub, master_sig) )
|
||||
->
|
||||
Ok
|
||||
{
|
||||
pub;
|
||||
value;
|
||||
stamp_start;
|
||||
stamp_expire_withdraw;
|
||||
stamp_expire_deposit;
|
||||
stamp_expire_legal;
|
||||
fee_withdraw;
|
||||
fee_deposit;
|
||||
fee_refresh;
|
||||
fee_refund;
|
||||
age_mask;
|
||||
h_pub;
|
||||
master_sig= Some master_sig;
|
||||
})
|
||||
(t12 rsa_pub amount time time time time amount amount amount amount int
|
||||
(t2 denomination_hash master_sig))
|
||||
|
||||
let account_restrictions =
|
||||
custom
|
||||
~encode:(fun l -> Api.encode (Jsont.list AccountRestriction.jsont) l)
|
||||
|
|
@ -122,22 +208,6 @@ module Caqti_type = struct
|
|||
Caqti_type.(
|
||||
t9 time time amount amount amount time_span int32 time_span master_sig)
|
||||
|
||||
include struct
|
||||
(* alias for hash *)
|
||||
|
||||
let fullpayto_hash = FullPaytoHash.caqti
|
||||
let nomalizaedpayto_hash = NormalizedPaytoHash.caqti
|
||||
let denomination_hash = DenominationHash.caqti
|
||||
let privatecontract_hash = PrivateContractHash.caqti
|
||||
let extensionspolicy_hash = ExtensionsPolicyHash.caqti
|
||||
let merchantwire_hash = MerchantWireHash.caqti
|
||||
let agecommitment_hash = AgeCommitmentHash.caqti
|
||||
let blindedcoin_hash = BlindedCoinHash.caqti
|
||||
let coinpub_hash = CoinPubHash.caqti
|
||||
let outputcommitment_hash = OutputCommitmentHash.caqti
|
||||
let planchets_hash = HashPlanchetsP.caqti
|
||||
end
|
||||
|
||||
include Caqti_request.Infix
|
||||
end
|
||||
|
||||
|
|
@ -204,7 +274,6 @@ let add_denomination_key =
|
|||
Denom_data.
|
||||
{
|
||||
pub;
|
||||
section_name= _;
|
||||
value;
|
||||
stamp_start;
|
||||
stamp_expire_withdraw;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue