diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/api-exchange.rst | 49 |
1 files changed, 17 insertions, 32 deletions
diff --git a/core/api-exchange.rst b/core/api-exchange.rst index 8d1701d4..b09dadfa 100644 --- a/core/api-exchange.rst +++ b/core/api-exchange.rst @@ -2428,20 +2428,21 @@ If so, the exchange will blindly sign ``n`` undisclosed coins from the request. .. ts:def:: AgeWithdrawRequest interface AgeWithdrawRequest { - // Commitment to the coins with age restriction. This is the SHA512 - // hash value $ACH over all n*kappa `BlindedCoinHash` values of all - // coins and their age commitments. It is alter used as part of the URL - // in the subsequent call to /age-withdraw/$ACH/reveal. - h_commitment : HashCode; - - // The total amount that the client wants to withdraw from the reserve - // and must be at most the balance of the reserve. The balance of the - // reserve will be immediatley reduced by that amount. - // In the subsequent call to /age-withdraw/$ACH/reveal, the client has to - // provide the list of denominations (with support for age restriction) - // that the coins shall be signed with. The sum of the values of those - // denominations MUST equal this amount. - amount: Amount; + // Array of ``n`` hash codes of denomination public keys to order. + // These denominations MUST support age restriction as defined in the + // output to /keys. + // The sum of all denomination's values plus fees MUST be at most the + // balance of the reserve. The balance of the reserve will be + // immediatley reduced by that amount. + denoms_h: HashCode[]; + + // ``n`` arrays of ``kappa`` entries with blinded coin envelopes. Each + // (toplevel) entry represents ``kappa`` canditates for a particular + // coin. The exchange will respond with an index ``gamma``, which is + // the index that shall remain undisclosed during the reveal phase. + // The SHA512 hash $ACH over the blinded coin envelopes is the commitment + // that is later used as the key to the reveal-URL. + blinded_coins_evs: CoinEnvelope[][]; // The maximum age to commit to. MUST be the same as the maximum // age in the reserve. @@ -2515,26 +2516,10 @@ If so, the exchange will blindly sign ``n`` undisclosed coins from the request. // request. Needed for optimized database lookup. reserve_pub: EddsaPublicKey; - // Array of ``n`` hash codes of denomination public keys to order. - // These denominations MUST support age restriction as defined in the - // output to /keys. - // The sum of all denomination's values MUST equal the original amount - // of the previous commitment. - denoms_h: HashCode[]; - - // Array of ``n`` entries with blinded coins, which are the non-desclosed - // coins in the previous commitment. They match the respective entries - // in ``denoms_h``. - coin_evs: CoinEnvelope[]; - - // Array of ``n`` of ``(kappa - 1)`` disclosed coin secrets, from + // Array of ``n`` of ``(kappa - 1)`` disclosed coin master secrets, from // which the coins' private key ``coin_priv``, blinding ``beta`` and nonce // ``nonce`` (for Clause-Schnorr) itself are derived as usually in wallet - // core. - // (TODO: description of the derivation process of the coin's private - // key, blinding and nonce). - // - // Given a coin's secret, the age commitment for the coin MUST be + // core. Given a coin's secret, the age commitment for the coin MUST be // derived from this private key as follows: // // Let m ∈ {1,...,M} be the maximum age group as defined in the reserve |