- POST /reserves/$RESERVE_PUB/open#
Request keeping a reserve open for invoicing.
Request:
The request body must be a ReserveOpenRequest object.
Response:
- 200 OK:
The exchange responds with a ReserveOpenResponse object.
- 402 Payment Required:
The exchange responds with a ReserveOpenFailure object when the payment offered is insufficient for the requested operation.
- 403 Forbidden:
The TALER_SIGNATURE_WALLET_RESERVE_OPEN signature is invalid. This response comes with a standard ErrorDetail response.
- 404 Not found:
The reserve key does not belong to a reserve known to the exchange.
- 409 Conflict:
The balance of the reserve or of a coin was insufficient. Which case it is can be decided by looking at the error code (
TALER_EC_EXCHANGE_GENERIC_INSUFFICIENT_FUNDSorTALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_DENOMINATION_KEYorTALER_EC_EXCHANGE_OPEN_INSUFFICIENT_FUNDS). The specific fields of the response depend on the error code and include the signatures (and what was signed over) proving the conflict. The response is WithdrawError object or a DepositDoubleSpendError depending on the error type.- 451 Unavailable For Legal Reasons:
This account has not yet passed the KYC checks. The client must pass KYC checks before the reserve can be opened. The response will be an LegitimizationNeededResponse object.
Details:
interface ReserveOpenRequest { // Signature of purpose // TALER_SIGNATURE_WALLET_RESERVE_OPEN over // a TALER_ReserveOpenPS. reserve_sig: EddsaSignature; // Array of payments made towards the cost of the // operation. payments: OpenPaymentDetail[]; // Amount to be paid from the reserve for this // operation. reserve_payment: Amount; // Time when the client made the request. // Timestamp must be reasonably close to the time of // the exchange, otherwise the exchange may reject // the request (with a status code of 400). request_timestamp: Timestamp; // Desired new expiration time for the reserve. // If the reserve would expire before this time, // the exchange will charge account fees (and // possibly KYC fees) until the expiration time // exceeds this timestamp. Note that the exchange // will refuse requests (with a status code of 400) // if the time is so far in the future that the // fees are not yet known (see /keys). reserve_expiration: Timestamp; // Desired open purse limit. Can be used to pay the // annual account fee more than once to get a larger // purse limit. purse_limit: Integer; }
interface OpenPaymentDetail { // Contribution of this coin to the overall amount. // Can be a fraciton of the coin's total value. amount: Amount; // Hash of denomination RSA key with which the coin is signed. denom_pub_hash: HashCode; // Exchange's unblinded RSA signature of the coin. ub_sig: DenominationSignature; // Age commitment for the coin, if the denomination is age-restricted. age_commitment?: AgeCommitment; // Signature over TALER_ReserveOpenDepositSignaturePS // of purpose TALER_SIGNATURE_WALLET_RESERVE_OPEN_DEPOSIT // made by the customer with the // coin's private key. coin_sig: EddsaSignature; // Public key of the coin being used to pay for // opening the reserve. coin_pub: EddsaPublicKey; }