From c6ba84462dd642f11f783ff33b36dc00fda6750c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 12 Jan 2020 17:58:17 +0100 Subject: dead --- src/include/taler_fakebank_lib.h | 58 +++++++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 10 deletions(-) (limited to 'src/include/taler_fakebank_lib.h') diff --git a/src/include/taler_fakebank_lib.h b/src/include/taler_fakebank_lib.h index 474c6627d..19deae9c0 100644 --- a/src/include/taler_fakebank_lib.h +++ b/src/include/taler_fakebank_lib.h @@ -62,7 +62,7 @@ TALER_FAKEBANK_check_empty (struct TALER_FAKEBANK_Handle *h); /** - * Tell the fakebank to create another wire transfer. + * Tell the fakebank to create another wire transfer *from* an exchange. * * @param h fake bank handle * @param debit_account account to debit @@ -77,18 +77,36 @@ TALER_FAKEBANK_make_transfer (struct TALER_FAKEBANK_Handle *h, const char *debit_account, const char *credit_account, const struct TALER_Amount *amount, - const char *subject, + const struct + TALER_WireTransferIdentifierRawP *subject, const char *exchange_base_url); +/** + * Tell the fakebank to create another wire transfer *to* an exchange. + * + * @param h fake bank handle + * @param debit_account account to debit + * @param credit_account account to credit + * @param amount amount to transfer + * @param reserve_pub reserve public key to use in subject + * @return serial_id of the transfer + */ +uint64_t +TALER_FAKEBANK_make_admin_transfer (struct TALER_FAKEBANK_Handle *h, + const char *debit_account, + const char *credit_account, + const struct TALER_Amount *amount, + const struct + TALER_ReservePublicKeyP *reserve_pub); + + /** * Check that the @a want_amount was transferred from the @a * want_debit to the @a want_credit account. If so, set the @a subject * to the transfer identifier and remove the transaction from the * list. If the transaction was not recorded, return #GNUNET_SYSERR. * - * Rejected transfers do NOT show with "check". - * * @param h bank instance * @param want_amount transfer amount desired * @param want_debit account that should have been debited @@ -99,12 +117,32 @@ TALER_FAKEBANK_make_transfer (struct TALER_FAKEBANK_Handle *h, * @return #GNUNET_OK on success */ int -TALER_FAKEBANK_check (struct TALER_FAKEBANK_Handle *h, - const struct TALER_Amount *want_amount, - const char *want_debit, - const char *want_credit, - const char *exchange_base_url, - char **subject); +TALER_FAKEBANK_check_debit (struct TALER_FAKEBANK_Handle *h, + const struct TALER_Amount *want_amount, + const char *want_debit, + const char *want_credit, + const char *exchange_base_url, + struct TALER_WireTransferIdentifierRawP **subject); + + +/** + * Check that the @a want_amount was transferred from the @a want_debit to the + * @a want_credit account with the @a subject. If so, remove the transaction + * from the list. If the transaction was not recorded, return #GNUNET_SYSERR. + * + * @param h bank instance + * @param want_amount transfer amount desired + * @param want_debit account that should have been debited + * @param want_debit account that should have been credited + * @param reserve_pub reserve public key expected in wire subject + * @return #GNUNET_OK on success + */ +int +TALER_FAKEBANK_check_credit (struct TALER_FAKEBANK_Handle *h, + const struct TALER_Amount *want_amount, + const char *want_debit, + const char *want_credit, + const struct TALER_ReservePublicKeyP *reserve_pub); /** -- cgit v1.2.3