From 7a1dcc52ca9a6d79be10076b06b9a3e6ea35d395 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 11 Apr 2022 16:48:30 +0200 Subject: -towards new GET /contracts/$C_PUB hander --- src/include/taler_exchangedb_plugin.h | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'src/include/taler_exchangedb_plugin.h') diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index c065f581..39fa2ecd 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -4443,6 +4443,26 @@ struct TALER_EXCHANGEDB_Plugin bool *in_conflict); + /** + * Function called to retrieve an encrypted contract. + * + * @param cls the @e cls of this struct with the plugin-specific state + * @param pub_ckey set to the ephemeral DH used to encrypt the contract, key used to lookup the contract by + * @param[out] purse_pub public key of the purse of the contract + * @param[out] econtract_sig set to the signature over the encrypted contract + * @param[out] econtract_size set to the number of bytes in @a econtract + * @param[out] econtract set to the encrypted contract on success, to be freed by the caller + * @return transaction status code + */ + enum GNUNET_DB_QueryStatus + (*select_contract)( + void *cls, + const struct TALER_ContractDiffiePublicP *pub_ckey, + struct TALER_PurseContractPublicKeyP *purse_pub, + struct TALER_PurseContractSignatureP *econtract_sig, + size_t *econtract_size, + void **econtract); + /** * Function called to retrieve an encrypted contract. * @@ -4455,12 +4475,13 @@ struct TALER_EXCHANGEDB_Plugin * @return transaction status code */ enum GNUNET_DB_QueryStatus - (*select_contract)(void *cls, - const struct TALER_PurseContractPublicKeyP *purse_pub, - struct TALER_ContractDiffiePublicP *pub_ckey, - struct TALER_PurseContractSignatureP *econtract_sig, - size_t *econtract_size, - void **econtract); + (*select_contract_by_purse)( + void *cls, + const struct TALER_PurseContractPublicKeyP *purse_pub, + struct TALER_ContractDiffiePublicP *pub_ckey, + struct TALER_PurseContractSignatureP *econtract_sig, + size_t *econtract_size, + void **econtract); /** -- cgit v1.2.3