put-deposit-confirmation.rst (3657B)
1 .. http:put:: /deposit-confirmation 2 3 Submits a `DepositConfirmation` to the exchange. Should succeed 4 unless the signature provided is invalid or the exchange is not 5 audited by this auditor. 6 7 **Response:** 8 9 :http:statuscode:`200 Ok`: 10 The auditor responds with a `DepositAudited` object. 11 This request should virtually always be successful. 12 :http:statuscode:`400 Bad Request`: 13 The request body is malformed or invalid. 14 The response comes with a ``TALER_EC_GENERIC_JSON_INVALID`` or 15 ``TALER_EC_GENERIC_PARAMETER_MALFORMED`` error code. 16 :http:statuscode:`403 Forbidden`: 17 The signature on the deposit confirmation is invalid. 18 The response comes with a ``TALER_EC_AUDITOR_DEPOSIT_CONFIRMATION_SIGNATURE_INVALID`` 19 error code. 20 :http:statuscode:`410 Gone`: 21 The public key used to sign the deposit confirmation 22 was revoked. 23 The response comes with a ``TALER_EC_AUDITOR_EXCHANGE_SIGNING_KEY_REVOKED`` 24 error code. 25 :http:statuscode:`500 Internal Server Error`: 26 The server experienced an internal error. 27 The response comes with a ``TALER_EC_GENERIC_DB_SETUP_FAILED``, 28 ``TALER_EC_GENERIC_DB_STORE_FAILED``, or 29 ``TALER_EC_GENERIC_DB_FETCH_FAILED`` error code. 30 31 **Details:** 32 33 .. ts:def:: DepositAudited 34 35 interface DepositAudited { 36 // TODO: maybe change to ``204 No content`` instead? 37 } 38 39 .. ts:def:: DepositConfirmation 40 41 interface DepositConfirmation { 42 43 // Hash over the contract for which this deposit is made. 44 h_contract_terms: HashCode; 45 46 // Hash over the extensions. 47 h_extensions: HashCode; 48 49 // Hash over the wiring information of the merchant. 50 h_wire: HashCode; 51 52 // Time when the deposit confirmation confirmation was generated. 53 timestamp: Timestamp; 54 55 // How much time does the merchant have to issue a refund 56 // request? Zero if refunds are not allowed. 57 refund_deadline: Timestamp; 58 59 // By what time does the exchange have to wire the funds? 60 wire_deadline: Timestamp; 61 62 // Amount to be deposited, excluding fee. Calculated from the 63 // amount with fee and the fee from the deposit request. 64 amount_without_fee: Amount; 65 66 // Array of public keys of the deposited coins. 67 coin_pubs: EddsaPublicKey[]; 68 69 // Array of deposit signatures of the deposited coins. 70 // Must have the same length as ``coin_pubs``. 71 coin_sigs: EddsaSignature[]; 72 73 // The Merchant's public key. Allows the merchant to later refund 74 // the transaction or to inquire about the wire transfer identifier. 75 merchant_pub: EddsaPublicKey; 76 77 // Signature from the exchange of type 78 // ``TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT``. 79 exchange_sig: EddsaSignature; 80 81 // Public signing key from the exchange matching ``exchange_sig``. 82 exchange_pub: EddsaPublicKey; 83 84 // Master public key of the exchange corresponding to ``master_sig``. 85 // Identifies the exchange this is about. 86 // @deprecated since v1 (now ignored, global per auditor) 87 master_pub: EddsaPublicKey; 88 89 // When does the validity of the exchange_pub end? 90 ep_start: Timestamp; 91 92 // When will the exchange stop using the signing key? 93 ep_expire: Timestamp; 94 95 // When does the validity of the exchange_pub end? 96 ep_end: Timestamp; 97 98 // Exchange master signature over ``exchange_sig``. 99 master_sig: EddsaSignature; 100 } 101 102 .. note:: 103 104 This endpoint is still experimental (and is not yet implemented at the 105 time of this writing). A key open question is whether the auditor 106 should sign the response information.