post-reveal-melt.rst (3510B)
1 .. http:post:: /reveal-melt 2 3 Reveal previously committed values to the exchange, except for the values 4 corresponding to the ``noreveal_index`` returned by the ``/melt`` step. 5 6 The base URL for ``/reveal-melt``-request may differ from the main base URL of 7 the exchange. Clients SHOULD respect the ``reveal_base_url`` returned for the 8 coin during melt operations. The exchange MUST return a 9 307 or 308 redirection to the correct base URL if the client failed to 10 respect the ``reveal_base_url`` or if the allocation has changed. 11 12 The request body is a `RevealMeltRequest`. 13 14 This endpoint was introduced in this form in protocol **v32**. 15 16 :http:statuscode:`200 OK`: 17 The coin's' secret material matched the commitment and the original request was well-formed. 18 The response body is a `RevealResponse`. 19 :http:statuscode:`403 Forbidden`: 20 One of the signatures is invalid. 21 This response comes with a standard `ErrorDetail` response. 22 :http:statuscode:`404 Not found`: 23 The provided commitment is unknown. 24 :http:statuscode:`409 Conflict`: 25 There is a problem between the original commitment and the revealed secret data. 26 The returned information is proof of the mismatch, 27 and therefore rather verbose, as it includes most of the original /melt request, 28 but of course expected to be primarily used for diagnostics. 29 30 The response body is a `RevealConflictResponse`. 31 32 **Details:** 33 34 Request body for a ``reveal-melt`` request 35 contains a JSON object with the following fields: 36 37 .. ts:def:: RevealMeltRequest 38 39 interface RevealMeltRequest { 40 // The refresh commitment from the ``/melt/`` step, 41 // see `TALER_RefreshCommitmentP`. 42 rc: HashCode; 43 44 // @since v27 45 // @deprecated **v32** 46 // The disclosed kappa-1 signatures by the old coin's private key, 47 // over Hash1a("Refresh", Cp, r, i), where Cp is the melted coin's public key, 48 // r is the public refresh nonce from the metling step and i runs over the 49 // _disclosed_ kappa-1 indices. 50 signatures: CoinSignature[kappa-1]; 51 52 // @since **v32** 53 // The batch seeds for the transfer private keys to reveal, 54 // as they were generated for the previous `MeltRequest`. 55 // That is, assuming an honest client who had generated 56 // kappa many batch seeds via HKDF like this: 57 // 58 // ``bs[] = HKDF(kappa*sizeof(HashCode),`` 59 // ``"refresh-batch-seeds",`` 60 // ``old_coin_priv,`` 61 // ``refresh_seed)``, 62 // 63 // this field contains the entries in ``bs[]`` for all the indeces 64 // *except* the ``noreveal_index``. 65 batch_seeds: HashCode[kappa-1]; 66 67 // IFF the denomination of the old coin had support for age restriction, 68 // the client MUST provide the original age commitment, i. e. the 69 // vector of public keys, or omitted otherwise. 70 // The size of the vector MUST be the number of age groups as defined by the 71 // Exchange in the field ``.age_groups`` of the extension ``age_restriction``. 72 age_commitment?: Edx25519PublicKey[]; 73 74 } 75 76 .. ts:def:: RevealResponse 77 78 type RevealResponse = WithdrawResponse; 79 80 81 .. ts:def:: RevealConflictResponse 82 83 interface RevealConflictResponse { 84 // Text describing the error. 85 hint: string; 86 87 // Detailed error code. 88 code: Integer; 89 90 // Commitment as calculated by the exchange from the revealed data. 91 rc_expected: HashCode; 92 93 }