taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit ea7d022a91662cc249ef07a75086edcd62dac089
parent 808df9b329fde85a4b15cd2b2ceb28fa57707ff3
Author: Özgür Kesim <oec-taler@kesim.org>
Date:   Wed, 22 Jun 2022 18:01:15 +0200

Cleanup of new denomination grouping

Diffstat:
Mcore/api-exchange.rst | 84+++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
1 file changed, 52 insertions(+), 32 deletions(-)

diff --git a/core/api-exchange.rst b/core/api-exchange.rst @@ -240,6 +240,56 @@ possibly by using HTTPS. .. ts:def:: DenomGroup + type DenomGroup = + | DenomGroupRsa + | DenomGroupCs + | DenomGroupRsaAgeRestricted + | DenomGroupCsAgeRestricted; + + .. ts:def:: DenomGroupRsa + + interface DenomGroupRsa extends DenomGroupCommon { + cipher: "RSA"; + + denoms: ({ + rsa_pub: string; + } & DenomCommon)[]; + } + + .. ts:def:: DenomGroupCs + + interface DenomGroupCs extends DenomGroupCommon { + cipher: "CS"; + + denoms: ({ + cs_pub: Cs25519Point; + } & DenomCommon)[]; + } + + .. ts:def:: DenomGroupRsaAgeRestricted + + interface DenomGroupRsaAgeRestricted extends DenomGroupCommon { + cipher: "RSA+age_restricted"; + age_mask: string; + + denoms: ({ + rsa_pub: string; + } & DenomCommon)[]; + } + + .. ts:def:: DenomGroupCsAgeRestricted + + interface DenomGroupCSAgeRestricted extends DenomGroupCommon { + cipher: "CS+age_restricted"; + age_mask: string; + + denoms: ({ + cs_pub: Cs25519Point; + } & DenomCommon)[]; + } + + .. ts:def:: DenomGroupCommon + // Common attributes for all denomination groups interface DenomGroupCommon { // How much are coins of this denomination worth? @@ -261,6 +311,8 @@ possibly by using HTTPS. hash: HashCode; } + .. ts:def:: DenomCommon + interface DenomCommon { // Signature of `TALER_DenominationKeyValidityPS`. master_sig: EddsaSignature; @@ -278,38 +330,6 @@ possibly by using HTTPS. stamp_expire_legal: Timestamp; } - type DenomGroup = - | DenomGroupRsa - | DenomGroupCs - | DenomGroupRsaAgeRestricted - | DenomGroupCsAgeRestricted; - - interface DenomGroupRsa extends DenomGroupCommon { - cipher: "RSA"; - - denoms: ({ - rsa_pub: string; - } & DenomGroupCommon)[]; - } - - interface DenomGroupCs extends DenomGroupCommon { - cipher: "CS"; - - denoms: ({ - cs_pub: Cs25519Point; - age_mask: string; - } & DenomGroupCommon)[]; - } - - interface DenomGroupRsaAgeRestricted extends DenomGroupCommon { - cipher: "RSA+age_restricted"; - - denoms: ({ - rsa_pub: string; - age_mask: string; - } & DenomGroupCommon)[]; - } - .. ts:def:: Denom interface Denom {