commit 65d36c059b9f226f36913d37ad57613bdb8e2da6 parent dbd92a613d4762fd18cd717319b93d38eb690cbf Author: Christian Blättler <blatc2@bfh.ch> Date: Fri, 26 Apr 2024 13:59:53 +0200 work on token outputs api spec Diffstat:
| M | core/api-merchant.rst | | | 45 | +++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 45 insertions(+), 0 deletions(-)
diff --git 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 {