summaryrefslogtreecommitdiff
path: root/core/api-merchant.rst
diff options
context:
space:
mode:
Diffstat (limited to 'core/api-merchant.rst')
-rw-r--r--core/api-merchant.rst69
1 files changed, 67 insertions, 2 deletions
diff --git a/core/api-merchant.rst b/core/api-merchant.rst
index 53ccdae6..75e1353c 100644
--- a/core/api-merchant.rst
+++ b/core/api-merchant.rst
@@ -350,6 +350,18 @@ Making the payment
// The coins used to make the payment.
coins: CoinPaySig[];
+ // Index of the chosen sub-contract.
+ // @since protocol **vSUBSCRIBE**
+ choice_index?: Integer;
+
+ // Input tokens required by choice indicated by `choice_index`.
+ // @since protocol **vSUBSCRIBE**
+ tokens: TokenPaySig[];
+
+ // Array of blinded output tokens to be (blindly) signed by the merchant.
+ // @since protocol **vSUBSCRIBE**
+ tokens_evs: TokenEnvelope[];
+
// Custom inputs from the wallet for the contract.
wallet_data?: Object;
@@ -381,6 +393,59 @@ Making the payment
exchange_url: string;
}
+ .. ts:def:: TokenPaySig
+
+ interface TokenPaySig {
+
+ // Signature on ``TALER_DepositRequestPS`` with the public key of the
+ // token being provisioned to the merchant.
+ token_sig: EddsaSignature;
+
+ // Public key of the token being provisioned to the merchant.
+ token_pub: EddsaPublicKey;
+
+ // Unblinded signature made by the token family public key of the merchant.
+ ub_sig: UnblindedSignature;
+
+ // The hash of the token family public key associated with this token.
+ h_denom: HashCode;
+
+ }
+
+ .. ts:def:: TokenEnvelope
+
+ // This type depends on the cipher used to sign token families. This is
+ // configured by the merchant and defined for each token family in the
+ // contract terms.
+ type TokenEnvelope = RSATokenEnvelope | CSTokenEnvelope;
+
+ .. ts:def:: RSATokenEnvelope
+
+ interface RSATokenEnvelope {
+
+ // RSA is used for the blind signature.
+ cipher: "RSA";
+
+ // Blinded signature of the token's `public EdDSA key <eddsa-token-pub>`.
+ rsa_blinded_pub: BlindedRsaSignature;
+
+ }
+
+ .. ts:def:: CSTokenEnvelope
+
+ interface CSTokenEnvelope {
+ // Blind Clause-Schnorr signature scheme is used for the blind signature.
+ // See https://taler.net/papers/cs-thesis.pdf for details.
+ cipher: "CS";
+
+ // Public nonce
+ cs_nonce: string; // Crockford `Base32` encoded
+
+ // Two Curve25519 scalars, each representing a blinded challenge
+ cs_blinded_c0: string; // Crockford `Base32` encoded
+ cs_blinded_c1: string; // Crockford `Base32` encoded
+ }
+
Querying payment status
-----------------------
@@ -3747,8 +3812,8 @@ protocol **vSUBSCRIBE**.
type: "token";
// How many units of the input are required. Defaults to 1 if not specified.
- // Input with number == 0 are ignored by the merchant backend.
- number?: Integer;
+ // Input with count == 0 are ignored by the merchant backend.
+ count?: Integer;
// Token family slug as configured in the merchant backend. Slug is unique
// across all configured tokens of a merchant.