diff options
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 { |