diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2022-06-22 18:01:15 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2022-06-22 18:01:15 +0200 |
commit | ea7d022a91662cc249ef07a75086edcd62dac089 (patch) | |
tree | b2350f98afbab8a490a5afd51f64d4f3fc528a54 /core | |
parent | 808df9b329fde85a4b15cd2b2ceb28fa57707ff3 (diff) | |
download | docs-ea7d022a91662cc249ef07a75086edcd62dac089.tar.gz docs-ea7d022a91662cc249ef07a75086edcd62dac089.tar.bz2 docs-ea7d022a91662cc249ef07a75086edcd62dac089.zip |
Cleanup of new denomination grouping
Diffstat (limited to 'core')
-rw-r--r-- | core/api-exchange.rst | 84 |
1 files changed, 52 insertions, 32 deletions
diff --git a/core/api-exchange.rst b/core/api-exchange.rst index 990a475a..0b5b3b70 100644 --- 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 { |