diff options
author | Christian Blättler <blatc2@bfh.ch> | 2024-04-26 13:59:53 +0200 |
---|---|---|
committer | Christian Blättler <blatc2@bfh.ch> | 2024-04-26 13:59:53 +0200 |
commit | 65d36c059b9f226f36913d37ad57613bdb8e2da6 (patch) | |
tree | 7f176f16b7284299a1ac8ab1a35abd9f428fdef2 | |
parent | dbd92a613d4762fd18cd717319b93d38eb690cbf (diff) | |
download | docs-master.tar.gz docs-master.tar.bz2 docs-master.zip |
-rw-r--r-- | core/api-merchant.rst | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/core/api-merchant.rst b/core/api-merchant.rst index 3fe808b3..a492abc4 100644 --- a/core/api-merchant.rst +++ b/core/api-merchant.rst @@ -342,6 +342,11 @@ Making the payment // payment. pos_confirmation?: string; + // Signed tokens. Returned in the same order as the + // token envelopes were provided in the request. + // @since protocol **vSUBSCRIBE** + token_sigs: TokenIssueBlindSig[]; + } .. ts:def:: PayRequest @@ -368,6 +373,46 @@ Making the payment } + .. ts:def:: SignedTokenEnvelope + + // TODO: Check if we actually need this wrapper interface. + // Could be useful if we want to add some metadata to + // the issued coin. + interface SignedTokenEnvelope { + + // Blind signature made by the merchant. + blind_sig: TokenIssueBlindSig; + + } + + .. ts:def:: TokenIssueBlindSig + + type TokenIssueBlindSig = RSATokenIssueBlindSig | CSTokenIssueBlindSig; + + .. ts:def:: RSATokenIssueBlindSig + + interface RSATokenIssueBlindSig { + cipher: "RSA"; + + // (blinded) RSA signature + blinded_rsa_signature: BlindedRsaSignature; + } + + .. ts:def:: CSTokenIssueBlindSig + + interface CSTokenIssueBlindSig { + type: "CS"; + + // Signer chosen bit value, 0 or 1, used + // in Clause Blind Schnorr to make the + // ROS problem harder. + b: Integer; + + // Blinded scalar calculated from c_b. + s: Cs25519Scalar; + + } + .. ts:def:: PayWalletData interface PayWalletData { |