get-purses-PURSE_PUB-merge.rst (2464B)
1 .. http:get:: /purses/$PURSE_PUB/merge 2 .. http:get:: /purses/$PURSE_PUB/deposit 3 4 Obtain information about a purse. Depending on the suffix, 5 the long-polling (if any) will wait for either a merge or 6 a deposit event. 7 8 **Request:** 9 10 :query timeout_ms=NUMBER: *Optional.* If specified, 11 the exchange 12 will wait up to ``NUMBER`` milliseconds for completion 13 of a merge operation before sending the HTTP response. 14 :query deposit_timeout_ms=NUMBER: *Optional.* If specified, 15 the exchange 16 will wait up to ``NUMBER`` milliseconds for completion 17 of a deposit operation before sending the HTTP response. 18 19 **Response:** 20 21 :http:statuscode:`200 OK`: 22 The operation succeeded, the exchange provides details 23 about the purse. 24 The response will include a `PurseStatus` object. 25 :http:statuscode:`404 Not found`: 26 The purse is unknown to the exchange. 27 :http:statuscode:`410 Gone`: 28 The purse expired before the deposit or merge was completed. 29 30 **Details:** 31 32 .. ts:def:: PurseStatus 33 34 interface PurseStatus { 35 36 // Total amount deposited into the purse so far. 37 // If 'total_deposit_amount' minus 'deposit_fees' 38 // exceeds 'merge_value_after_fees', and a 39 // 'merge_request' exists for the purse, then the 40 // purse will (have been) merged with the account. 41 balance: Amount; 42 43 // Time of the merge, missing if "never". 44 merge_timestamp?: Timestamp; 45 46 // Time of the deposits being complete, missing if "never". 47 // Note that this time may not be "stable": once sufficient 48 // deposits have been made, is "now" before the purse 49 // expiration, and otherwise set to the purse expiration. 50 // However, this should also not be relied upon. The key 51 // property is that it is either "never" or in the past. 52 deposit_timestamp?: Timestamp; 53 54 // Time when the purse expires and 55 // funds that were not merged are refunded 56 // on the deposited coins. 57 // FIXME: Document the exchange protocol version 58 // in which this field became available. 59 purse_expiration: Timestamp; 60 61 // EdDSA signature of the exchange over a 62 // `TALER_PurseStatusResponseSignaturePS` 63 // with purpose ``TALER_SIGNATURE_PURSE_STATUS_RESPONSE`` 64 // affirming the purse status. 65 exchange_sig: EddsaSignature; 66 67 // EdDSA public key exchange used for 'exchange_sig'. 68 exchange_pub: EddsaPublicKey; 69 70 }