Contents

GET /purses/$PURSE_PUB/merge#
GET /purses/$PURSE_PUB/deposit#

Obtain information about a purse. Depending on the suffix, the long-polling (if any) will wait for either a merge or a deposit event.

Request:

Query Parameters:
  • timeout_ms=NUMBEROptional. If specified, the exchange will wait up to NUMBER milliseconds for completion of a merge operation before sending the HTTP response.

  • deposit_timeout_ms=NUMBEROptional. If specified, the exchange will wait up to NUMBER milliseconds for completion of a deposit operation before sending the HTTP response.

Response:

200 OK:

The operation succeeded, the exchange provides details about the purse. The response will include a PurseStatus object.

404 Not found:

The purse is unknown to the exchange.

410 Gone:

The purse expired before the deposit or merge was completed.

Details:

 interface PurseStatus {

  // Total amount deposited into the purse so far.
  // If 'total_deposit_amount' minus 'deposit_fees'
  // exceeds 'merge_value_after_fees', and a
  // 'merge_request' exists for the purse, then the
  // purse will (have been) merged with the account.
  balance: Amount;

  // Time of the merge, missing if "never".
  merge_timestamp?: Timestamp;

  // Time of the deposits being complete, missing if "never".
  // Note that this time may not be "stable": once sufficient
  // deposits have been made, is "now" before the purse
  // expiration, and otherwise set to the purse expiration.
  // However, this should also not be relied upon. The key
  // property is that it is either "never" or in the past.
  deposit_timestamp?: Timestamp;

  // Time when the purse expires and
  // funds that were not merged are refunded
  // on the deposited coins.
  // FIXME: Document the exchange protocol version
  //        in which this field became available.
  purse_expiration: Timestamp;

  // EdDSA signature of the exchange over a
  // TALER_PurseStatusResponseSignaturePS
  // with purpose TALER_SIGNATURE_PURSE_STATUS_RESPONSE
  // affirming the purse status.
  exchange_sig: EddsaSignature;

  // EdDSA public key exchange used for 'exchange_sig'.
  exchange_pub: EddsaPublicKey;

}