code cleanup (comments, scoping, naming, indentation)
This commit is contained in:
parent
82d7b63ff5
commit
ffcadbff8c
@ -1 +1 @@
|
|||||||
Subproject commit ca53235ccfa0458ebf11c204888ca370e20ec3f5
|
Subproject commit 934a6a18301e81c4fd1b3a8cda2dc13dca4741cc
|
@ -190,8 +190,8 @@ main (int argc,
|
|||||||
struct TALER_AuditorSignatureP *sigs;
|
struct TALER_AuditorSignatureP *sigs;
|
||||||
struct TALER_AuditorPublicKeyP apub;
|
struct TALER_AuditorPublicKeyP apub;
|
||||||
struct GNUNET_DISK_FileHandle *fh;
|
struct GNUNET_DISK_FileHandle *fh;
|
||||||
struct TALER_DenominationKeyValidityPS *dks;
|
struct TALER_DenominationKeyValidityPS *dki;
|
||||||
unsigned int dks_len;
|
unsigned int dki_len;
|
||||||
struct TALER_ExchangeKeyValidityPS kv;
|
struct TALER_ExchangeKeyValidityPS kv;
|
||||||
off_t in_size;
|
off_t in_size;
|
||||||
|
|
||||||
@ -287,8 +287,8 @@ main (int argc,
|
|||||||
GNUNET_free (eddsa_priv);
|
GNUNET_free (eddsa_priv);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
dks_len = in_size / sizeof (struct TALER_DenominationKeyValidityPS);
|
dki_len = in_size / sizeof (struct TALER_DenominationKeyValidityPS);
|
||||||
if (0 == dks_len)
|
if (0 == dki_len)
|
||||||
{
|
{
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"Failed to produce auditor signature, denomination list is empty.\n");
|
"Failed to produce auditor signature, denomination list is empty.\n");
|
||||||
@ -312,13 +312,13 @@ main (int argc,
|
|||||||
strlen (auditor_url) + 1,
|
strlen (auditor_url) + 1,
|
||||||
&kv.auditor_url_hash);
|
&kv.auditor_url_hash);
|
||||||
kv.master = master_public_key;
|
kv.master = master_public_key;
|
||||||
dks = GNUNET_new_array (dks_len,
|
dki = GNUNET_new_array (dki_len,
|
||||||
struct TALER_DenominationKeyValidityPS);
|
struct TALER_DenominationKeyValidityPS);
|
||||||
sigs = GNUNET_new_array (dks_len,
|
sigs = GNUNET_new_array (dki_len,
|
||||||
struct TALER_AuditorSignatureP);
|
struct TALER_AuditorSignatureP);
|
||||||
if (in_size !=
|
if (in_size !=
|
||||||
GNUNET_DISK_file_read (fh,
|
GNUNET_DISK_file_read (fh,
|
||||||
dks,
|
dki,
|
||||||
in_size))
|
in_size))
|
||||||
{
|
{
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
@ -328,14 +328,14 @@ main (int argc,
|
|||||||
TALER_AUDITORDB_plugin_unload (adb);
|
TALER_AUDITORDB_plugin_unload (adb);
|
||||||
GNUNET_DISK_file_close (fh);
|
GNUNET_DISK_file_close (fh);
|
||||||
GNUNET_free (sigs);
|
GNUNET_free (sigs);
|
||||||
GNUNET_free (dks);
|
GNUNET_free (dki);
|
||||||
GNUNET_free (eddsa_priv);
|
GNUNET_free (eddsa_priv);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
GNUNET_DISK_file_close (fh);
|
GNUNET_DISK_file_close (fh);
|
||||||
for (unsigned int i = 0; i<dks_len; i++)
|
for (unsigned int i = 0; i<dki_len; i++)
|
||||||
{
|
{
|
||||||
struct TALER_DenominationKeyValidityPS *dk = &dks[i];
|
struct TALER_DenominationKeyValidityPS *dk = &dki[i];
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
print_dk (dk);
|
print_dk (dk);
|
||||||
@ -362,7 +362,7 @@ main (int argc,
|
|||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"Output file not given\n");
|
"Output file not given\n");
|
||||||
TALER_AUDITORDB_plugin_unload (adb);
|
TALER_AUDITORDB_plugin_unload (adb);
|
||||||
GNUNET_free (dks);
|
GNUNET_free (dki);
|
||||||
GNUNET_free (sigs);
|
GNUNET_free (sigs);
|
||||||
GNUNET_free (eddsa_priv);
|
GNUNET_free (eddsa_priv);
|
||||||
return 1;
|
return 1;
|
||||||
@ -375,7 +375,7 @@ main (int argc,
|
|||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"Failed to create tables in auditor's database\n");
|
"Failed to create tables in auditor's database\n");
|
||||||
TALER_AUDITORDB_plugin_unload (adb);
|
TALER_AUDITORDB_plugin_unload (adb);
|
||||||
GNUNET_free (dks);
|
GNUNET_free (dki);
|
||||||
GNUNET_free (sigs);
|
GNUNET_free (sigs);
|
||||||
GNUNET_free (eddsa_priv);
|
GNUNET_free (eddsa_priv);
|
||||||
return 3;
|
return 3;
|
||||||
@ -396,14 +396,14 @@ main (int argc,
|
|||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"Failed to initialize database session\n");
|
"Failed to initialize database session\n");
|
||||||
TALER_AUDITORDB_plugin_unload (adb);
|
TALER_AUDITORDB_plugin_unload (adb);
|
||||||
GNUNET_free (dks);
|
GNUNET_free (dki);
|
||||||
GNUNET_free (sigs);
|
GNUNET_free (sigs);
|
||||||
GNUNET_free (eddsa_priv);
|
GNUNET_free (eddsa_priv);
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
for (unsigned int i = 0; i<dks_len; i++)
|
for (unsigned int i = 0; i<dki_len; i++)
|
||||||
{
|
{
|
||||||
const struct TALER_DenominationKeyValidityPS *dk = &dks[i];
|
const struct TALER_DenominationKeyValidityPS *dk = &dki[i];
|
||||||
|
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"Adding denomination key %s to auditor database\n",
|
"Adding denomination key %s to auditor database\n",
|
||||||
@ -416,7 +416,7 @@ main (int argc,
|
|||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"Failed to store key in auditor DB (did you add the exchange using taler-auditor-exchange first?)\n");
|
"Failed to store key in auditor DB (did you add the exchange using taler-auditor-exchange first?)\n");
|
||||||
TALER_AUDITORDB_plugin_unload (adb);
|
TALER_AUDITORDB_plugin_unload (adb);
|
||||||
GNUNET_free (dks);
|
GNUNET_free (dki);
|
||||||
GNUNET_free (sigs);
|
GNUNET_free (sigs);
|
||||||
GNUNET_free (eddsa_priv);
|
GNUNET_free (eddsa_priv);
|
||||||
return 3;
|
return 3;
|
||||||
@ -432,19 +432,19 @@ main (int argc,
|
|||||||
auditor_url,
|
auditor_url,
|
||||||
sigs,
|
sigs,
|
||||||
&master_public_key,
|
&master_public_key,
|
||||||
dks_len,
|
dki_len,
|
||||||
dks))
|
dki))
|
||||||
{
|
{
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"Failed to write to file `%s': %s\n",
|
"Failed to write to file `%s': %s\n",
|
||||||
output_file,
|
output_file,
|
||||||
strerror (errno));
|
strerror (errno));
|
||||||
GNUNET_free (sigs);
|
GNUNET_free (sigs);
|
||||||
GNUNET_free (dks);
|
GNUNET_free (dki);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
GNUNET_free (sigs);
|
GNUNET_free (sigs);
|
||||||
GNUNET_free (dks);
|
GNUNET_free (dki);
|
||||||
GNUNET_free (eddsa_priv);
|
GNUNET_free (eddsa_priv);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1080,10 +1080,10 @@ postgres_list_exchanges (void *cls,
|
|||||||
* @return query result status
|
* @return query result status
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_exchange_signkey (void *cls,
|
postgres_insert_exchange_signkey (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_AUDITORDB_ExchangeSigningKey *sk)
|
const struct TALER_AUDITORDB_ExchangeSigningKey *sk)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (&sk->master_public_key),
|
GNUNET_PQ_query_param_auto_from_type (&sk->master_public_key),
|
||||||
@ -1111,10 +1111,10 @@ postgres_insert_exchange_signkey (void *cls,
|
|||||||
* @return query result status
|
* @return query result status
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_deposit_confirmation (void *cls,
|
postgres_insert_deposit_confirmation (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_AUDITORDB_DepositConfirmation *dc)
|
const struct TALER_AUDITORDB_DepositConfirmation *dc)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (&dc->master_public_key),
|
GNUNET_PQ_query_param_auto_from_type (&dc->master_public_key),
|
||||||
@ -1250,14 +1250,13 @@ deposit_confirmation_cb (void *cls,
|
|||||||
* @return query result status
|
* @return query result status
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_get_deposit_confirmations (void *cls,
|
postgres_get_deposit_confirmations (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_public_key,
|
const struct TALER_MasterPublicKeyP *master_public_key,
|
||||||
uint64_t start_id,
|
uint64_t start_id,
|
||||||
TALER_AUDITORDB_DepositConfirmationCallback
|
TALER_AUDITORDB_DepositConfirmationCallback cb,
|
||||||
cb,
|
void *cb_cls)
|
||||||
void *cb_cls)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -1296,10 +1295,10 @@ postgres_get_deposit_confirmations (void *cls,
|
|||||||
* @return operation status result
|
* @return operation status result
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_denomination_info (void *cls,
|
postgres_insert_denomination_info (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_DenominationKeyValidityPS *issue)
|
const struct TALER_DenominationKeyValidityPS *issue)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (&issue->denom_hash),
|
GNUNET_PQ_query_param_auto_from_type (&issue->denom_hash),
|
||||||
@ -1438,13 +1437,12 @@ denomination_info_cb (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_denomination_info (void *cls,
|
postgres_select_denomination_info (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_AUDITORDB_DenominationInfoDataCallback
|
TALER_AUDITORDB_DenominationInfoDataCallback cb,
|
||||||
cb,
|
void *cb_cls)
|
||||||
void *cb_cls)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -1483,14 +1481,11 @@ postgres_select_denomination_info (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_auditor_progress_reserve (void *cls,
|
postgres_insert_auditor_progress_reserve (
|
||||||
struct TALER_AUDITORDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_AUDITORDB_ProgressPointReserve *ppr)
|
||||||
const struct
|
|
||||||
TALER_AUDITORDB_ProgressPointReserve *
|
|
||||||
ppr)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -1519,14 +1514,11 @@ postgres_insert_auditor_progress_reserve (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_update_auditor_progress_reserve (void *cls,
|
postgres_update_auditor_progress_reserve (
|
||||||
struct TALER_AUDITORDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_AUDITORDB_ProgressPointReserve *ppr)
|
||||||
const struct
|
|
||||||
TALER_AUDITORDB_ProgressPointReserve *
|
|
||||||
ppr)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_uint64 (&ppr->last_reserve_in_serial_id),
|
GNUNET_PQ_query_param_uint64 (&ppr->last_reserve_in_serial_id),
|
||||||
@ -1554,12 +1546,11 @@ postgres_update_auditor_progress_reserve (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_get_auditor_progress_reserve (void *cls,
|
postgres_get_auditor_progress_reserve (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct
|
struct TALER_AUDITORDB_ProgressPointReserve *ppr)
|
||||||
TALER_AUDITORDB_ProgressPointReserve *ppr)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -1596,14 +1587,11 @@ postgres_get_auditor_progress_reserve (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_auditor_progress_aggregation (void *cls,
|
postgres_insert_auditor_progress_aggregation (
|
||||||
struct TALER_AUDITORDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_AUDITORDB_ProgressPointAggregation *ppa)
|
||||||
const struct
|
|
||||||
TALER_AUDITORDB_ProgressPointAggregation
|
|
||||||
*ppa)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -1629,14 +1617,11 @@ postgres_insert_auditor_progress_aggregation (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_update_auditor_progress_aggregation (void *cls,
|
postgres_update_auditor_progress_aggregation (
|
||||||
struct TALER_AUDITORDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_AUDITORDB_ProgressPointAggregation *ppa)
|
||||||
const struct
|
|
||||||
TALER_AUDITORDB_ProgressPointAggregation
|
|
||||||
*ppa)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_uint64 (&ppa->last_wire_out_serial_id),
|
GNUNET_PQ_query_param_uint64 (&ppa->last_wire_out_serial_id),
|
||||||
@ -1661,14 +1646,11 @@ postgres_update_auditor_progress_aggregation (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_get_auditor_progress_aggregation (void *cls,
|
postgres_get_auditor_progress_aggregation (
|
||||||
struct TALER_AUDITORDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
struct TALER_AUDITORDB_ProgressPointAggregation *ppa)
|
||||||
struct
|
|
||||||
TALER_AUDITORDB_ProgressPointAggregation
|
|
||||||
*ppa)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -1699,16 +1681,11 @@ postgres_get_auditor_progress_aggregation (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_auditor_progress_deposit_confirmation (void *cls,
|
postgres_insert_auditor_progress_deposit_confirmation (
|
||||||
struct
|
void *cls,
|
||||||
TALER_AUDITORDB_Session *
|
struct TALER_AUDITORDB_Session *session,
|
||||||
session,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc)
|
||||||
TALER_MasterPublicKeyP *
|
|
||||||
master_pub,
|
|
||||||
const struct
|
|
||||||
TALER_AUDITORDB_ProgressPointDepositConfirmation
|
|
||||||
*ppdc)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -1734,16 +1711,11 @@ postgres_insert_auditor_progress_deposit_confirmation (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_update_auditor_progress_deposit_confirmation (void *cls,
|
postgres_update_auditor_progress_deposit_confirmation (
|
||||||
struct
|
void *cls,
|
||||||
TALER_AUDITORDB_Session *
|
struct TALER_AUDITORDB_Session *session,
|
||||||
session,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc)
|
||||||
TALER_MasterPublicKeyP *
|
|
||||||
master_pub,
|
|
||||||
const struct
|
|
||||||
TALER_AUDITORDB_ProgressPointDepositConfirmation
|
|
||||||
*ppdc)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_uint64 (&ppdc->last_deposit_confirmation_serial_id),
|
GNUNET_PQ_query_param_uint64 (&ppdc->last_deposit_confirmation_serial_id),
|
||||||
@ -1768,16 +1740,11 @@ postgres_update_auditor_progress_deposit_confirmation (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_get_auditor_progress_deposit_confirmation (void *cls,
|
postgres_get_auditor_progress_deposit_confirmation (
|
||||||
struct
|
void *cls,
|
||||||
TALER_AUDITORDB_Session *
|
struct TALER_AUDITORDB_Session *session,
|
||||||
session,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc)
|
||||||
TALER_MasterPublicKeyP *
|
|
||||||
master_pub,
|
|
||||||
struct
|
|
||||||
TALER_AUDITORDB_ProgressPointDepositConfirmation
|
|
||||||
*ppdc)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -1808,12 +1775,11 @@ postgres_get_auditor_progress_deposit_confirmation (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_auditor_progress_coin (void *cls,
|
postgres_insert_auditor_progress_coin (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_AUDITORDB_ProgressPointCoin *ppc)
|
||||||
TALER_AUDITORDB_ProgressPointCoin *ppc)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -1844,12 +1810,11 @@ postgres_insert_auditor_progress_coin (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_update_auditor_progress_coin (void *cls,
|
postgres_update_auditor_progress_coin (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_AUDITORDB_ProgressPointCoin *ppc)
|
||||||
TALER_AUDITORDB_ProgressPointCoin *ppc)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_uint64 (&ppc->last_withdraw_serial_id),
|
GNUNET_PQ_query_param_uint64 (&ppc->last_withdraw_serial_id),
|
||||||
@ -1879,12 +1844,11 @@ postgres_update_auditor_progress_coin (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_get_auditor_progress_coin (void *cls,
|
postgres_get_auditor_progress_coin (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct TALER_AUDITORDB_ProgressPointCoin *
|
struct TALER_AUDITORDB_ProgressPointCoin *ppc)
|
||||||
ppc)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -1928,18 +1892,14 @@ postgres_get_auditor_progress_coin (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_wire_auditor_account_progress (void *cls,
|
postgres_insert_wire_auditor_account_progress (
|
||||||
struct TALER_AUDITORDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *
|
const char *account_name,
|
||||||
master_pub,
|
const struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
|
||||||
const char *account_name,
|
uint64_t in_wire_off,
|
||||||
const struct
|
uint64_t out_wire_off)
|
||||||
TALER_AUDITORDB_WireAccountProgressPoint
|
|
||||||
*pp,
|
|
||||||
uint64_t in_wire_off,
|
|
||||||
uint64_t out_wire_off)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -1972,18 +1932,14 @@ postgres_insert_wire_auditor_account_progress (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_update_wire_auditor_account_progress (void *cls,
|
postgres_update_wire_auditor_account_progress (
|
||||||
struct TALER_AUDITORDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *
|
const char *account_name,
|
||||||
master_pub,
|
const struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
|
||||||
const char *account_name,
|
uint64_t in_wire_off,
|
||||||
const struct
|
uint64_t out_wire_off)
|
||||||
TALER_AUDITORDB_WireAccountProgressPoint
|
|
||||||
*pp,
|
|
||||||
uint64_t in_wire_off,
|
|
||||||
uint64_t out_wire_off)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_uint64 (&pp->last_reserve_in_serial_id),
|
GNUNET_PQ_query_param_uint64 (&pp->last_reserve_in_serial_id),
|
||||||
@ -2015,17 +1971,14 @@ postgres_update_wire_auditor_account_progress (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_get_wire_auditor_account_progress (void *cls,
|
postgres_get_wire_auditor_account_progress (
|
||||||
struct TALER_AUDITORDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const char *account_name,
|
||||||
const char *account_name,
|
struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
|
||||||
struct
|
uint64_t *in_wire_off,
|
||||||
TALER_AUDITORDB_WireAccountProgressPoint
|
uint64_t *out_wire_off)
|
||||||
*pp,
|
|
||||||
uint64_t *in_wire_off,
|
|
||||||
uint64_t *out_wire_off)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -2063,12 +2016,11 @@ postgres_get_wire_auditor_account_progress (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_wire_auditor_progress (void *cls,
|
postgres_insert_wire_auditor_progress (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_AUDITORDB_WireProgressPoint *pp)
|
||||||
TALER_AUDITORDB_WireProgressPoint *pp)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -2095,12 +2047,11 @@ postgres_insert_wire_auditor_progress (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_update_wire_auditor_progress (void *cls,
|
postgres_update_wire_auditor_progress (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_AUDITORDB_WireProgressPoint *pp)
|
||||||
TALER_AUDITORDB_WireProgressPoint *pp)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
TALER_PQ_query_param_absolute_time (&pp->last_timestamp),
|
TALER_PQ_query_param_absolute_time (&pp->last_timestamp),
|
||||||
@ -2126,11 +2077,11 @@ postgres_update_wire_auditor_progress (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_get_wire_auditor_progress (void *cls,
|
postgres_get_wire_auditor_progress (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct TALER_AUDITORDB_WireProgressPoint *pp)
|
struct TALER_AUDITORDB_WireProgressPoint *pp)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -2331,13 +2282,12 @@ postgres_get_reserve_info (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_reserve_summary (void *cls,
|
postgres_insert_reserve_summary (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *reserve_balance,
|
const struct TALER_Amount *reserve_balance,
|
||||||
const struct
|
const struct TALER_Amount *withdraw_fee_balance)
|
||||||
TALER_Amount *withdraw_fee_balance)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -2370,13 +2320,12 @@ postgres_insert_reserve_summary (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_update_reserve_summary (void *cls,
|
postgres_update_reserve_summary (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *reserve_balance,
|
const struct TALER_Amount *reserve_balance,
|
||||||
const struct
|
const struct TALER_Amount *withdraw_fee_balance)
|
||||||
TALER_Amount *withdraw_fee_balance)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
TALER_PQ_query_param_amount (reserve_balance),
|
TALER_PQ_query_param_amount (reserve_balance),
|
||||||
@ -2441,11 +2390,11 @@ postgres_get_reserve_summary (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_wire_fee_summary (void *cls,
|
postgres_insert_wire_fee_summary (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *wire_fee_balance)
|
const struct TALER_Amount *wire_fee_balance)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -2471,11 +2420,11 @@ postgres_insert_wire_fee_summary (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_update_wire_fee_summary (void *cls,
|
postgres_update_wire_fee_summary (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *wire_fee_balance)
|
const struct TALER_Amount *wire_fee_balance)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
TALER_PQ_query_param_amount (wire_fee_balance),
|
TALER_PQ_query_param_amount (wire_fee_balance),
|
||||||
@ -2539,15 +2488,15 @@ postgres_get_wire_fee_summary (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_denomination_balance (void *cls,
|
postgres_insert_denomination_balance (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
GNUNET_HashCode *denom_pub_hash,
|
const struct GNUNET_HashCode *denom_pub_hash,
|
||||||
const struct TALER_Amount *denom_balance,
|
const struct TALER_Amount *denom_balance,
|
||||||
const struct TALER_Amount *denom_loss,
|
const struct TALER_Amount *denom_loss,
|
||||||
const struct TALER_Amount *denom_risk,
|
const struct TALER_Amount *denom_risk,
|
||||||
const struct TALER_Amount *recoup_loss,
|
const struct TALER_Amount *recoup_loss,
|
||||||
uint64_t num_issued)
|
uint64_t num_issued)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (denom_pub_hash),
|
GNUNET_PQ_query_param_auto_from_type (denom_pub_hash),
|
||||||
@ -2581,15 +2530,15 @@ postgres_insert_denomination_balance (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_update_denomination_balance (void *cls,
|
postgres_update_denomination_balance (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
GNUNET_HashCode *denom_pub_hash,
|
const struct GNUNET_HashCode *denom_pub_hash,
|
||||||
const struct TALER_Amount *denom_balance,
|
const struct TALER_Amount *denom_balance,
|
||||||
const struct TALER_Amount *denom_loss,
|
const struct TALER_Amount *denom_loss,
|
||||||
const struct TALER_Amount *denom_risk,
|
const struct TALER_Amount *denom_risk,
|
||||||
const struct TALER_Amount *recoup_loss,
|
const struct TALER_Amount *recoup_loss,
|
||||||
uint64_t num_issued)
|
uint64_t num_issued)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
TALER_PQ_query_param_amount (denom_balance),
|
TALER_PQ_query_param_amount (denom_balance),
|
||||||
@ -2670,17 +2619,17 @@ postgres_get_denomination_balance (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_balance_summary (void *cls,
|
postgres_insert_balance_summary (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *denom_balance,
|
const struct TALER_Amount *denom_balance,
|
||||||
const struct TALER_Amount *deposit_fee_balance,
|
const struct TALER_Amount *deposit_fee_balance,
|
||||||
const struct TALER_Amount *melt_fee_balance,
|
const struct TALER_Amount *melt_fee_balance,
|
||||||
const struct TALER_Amount *refund_fee_balance,
|
const struct TALER_Amount *refund_fee_balance,
|
||||||
const struct TALER_Amount *risk,
|
const struct TALER_Amount *risk,
|
||||||
const struct TALER_Amount *loss,
|
const struct TALER_Amount *loss,
|
||||||
const struct TALER_Amount *irregular_recoup)
|
const struct TALER_Amount *irregular_recoup)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -2729,17 +2678,17 @@ postgres_insert_balance_summary (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_update_balance_summary (void *cls,
|
postgres_update_balance_summary (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *denom_balance,
|
const struct TALER_Amount *denom_balance,
|
||||||
const struct TALER_Amount *deposit_fee_balance,
|
const struct TALER_Amount *deposit_fee_balance,
|
||||||
const struct TALER_Amount *melt_fee_balance,
|
const struct TALER_Amount *melt_fee_balance,
|
||||||
const struct TALER_Amount *refund_fee_balance,
|
const struct TALER_Amount *refund_fee_balance,
|
||||||
const struct TALER_Amount *risk,
|
const struct TALER_Amount *risk,
|
||||||
const struct TALER_Amount *loss,
|
const struct TALER_Amount *loss,
|
||||||
const struct TALER_Amount *irregular_recoup)
|
const struct TALER_Amount *irregular_recoup)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
TALER_PQ_query_param_amount (denom_balance),
|
TALER_PQ_query_param_amount (denom_balance),
|
||||||
@ -2826,17 +2775,14 @@ postgres_get_balance_summary (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_historic_denom_revenue (void *cls,
|
postgres_insert_historic_denom_revenue (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct GNUNET_HashCode *denom_pub_hash,
|
||||||
GNUNET_HashCode *denom_pub_hash,
|
struct GNUNET_TIME_Absolute revenue_timestamp,
|
||||||
struct GNUNET_TIME_Absolute
|
const struct TALER_Amount *revenue_balance,
|
||||||
revenue_timestamp,
|
const struct TALER_Amount *loss_balance)
|
||||||
const struct
|
|
||||||
TALER_Amount *revenue_balance,
|
|
||||||
const struct TALER_Amount *loss_balance)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -2947,13 +2893,12 @@ historic_denom_revenue_cb (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_historic_denom_revenue (void *cls,
|
postgres_select_historic_denom_revenue (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_AUDITORDB_HistoricDenominationRevenueDataCallback
|
TALER_AUDITORDB_HistoricDenominationRevenueDataCallback cb,
|
||||||
cb,
|
void *cb_cls)
|
||||||
void *cb_cls)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -2990,16 +2935,13 @@ postgres_select_historic_denom_revenue (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_historic_reserve_revenue (void *cls,
|
postgres_insert_historic_reserve_revenue (
|
||||||
struct TALER_AUDITORDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
struct GNUNET_TIME_Absolute start_time,
|
||||||
struct GNUNET_TIME_Absolute
|
struct GNUNET_TIME_Absolute end_time,
|
||||||
start_time,
|
const struct TALER_Amount *reserve_profits)
|
||||||
struct GNUNET_TIME_Absolute end_time,
|
|
||||||
const struct
|
|
||||||
TALER_Amount *reserve_profits)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -3103,14 +3045,12 @@ historic_reserve_revenue_cb (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_historic_reserve_revenue (void *cls,
|
postgres_select_historic_reserve_revenue (
|
||||||
struct TALER_AUDITORDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
TALER_AUDITORDB_HistoricReserveRevenueDataCallback cb,
|
||||||
TALER_AUDITORDB_HistoricReserveRevenueDataCallback
|
void *cb_cls)
|
||||||
cb,
|
|
||||||
void *cb_cls)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -3146,11 +3086,11 @@ postgres_select_historic_reserve_revenue (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_predicted_result (void *cls,
|
postgres_insert_predicted_result (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *balance)
|
const struct TALER_Amount *balance)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
GNUNET_PQ_query_param_auto_from_type (master_pub),
|
||||||
@ -3176,11 +3116,11 @@ postgres_insert_predicted_result (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_update_predicted_result (void *cls,
|
postgres_update_predicted_result (
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct TALER_Amount *balance)
|
const struct TALER_Amount *balance)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
TALER_PQ_query_param_amount (balance),
|
TALER_PQ_query_param_amount (balance),
|
||||||
|
@ -172,14 +172,14 @@ handle_admin_add_incoming_finished (void *cls,
|
|||||||
* In this case, the callback is not called.
|
* In this case, the callback is not called.
|
||||||
*/
|
*/
|
||||||
struct TALER_BANK_AdminAddIncomingHandle *
|
struct TALER_BANK_AdminAddIncomingHandle *
|
||||||
TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
|
TALER_BANK_admin_add_incoming (
|
||||||
const struct TALER_BANK_AuthenticationData *auth,
|
struct GNUNET_CURL_Context *ctx,
|
||||||
const struct
|
const struct TALER_BANK_AuthenticationData *auth,
|
||||||
TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
const struct TALER_Amount *amount,
|
const struct TALER_Amount *amount,
|
||||||
const char *debit_account,
|
const char *debit_account,
|
||||||
TALER_BANK_AdminAddIncomingCallback res_cb,
|
TALER_BANK_AdminAddIncomingCallback res_cb,
|
||||||
void *res_cb_cls)
|
void *res_cb_cls)
|
||||||
{
|
{
|
||||||
struct TALER_BANK_AdminAddIncomingHandle *aai;
|
struct TALER_BANK_AdminAddIncomingHandle *aai;
|
||||||
json_t *admin_obj;
|
json_t *admin_obj;
|
||||||
@ -257,8 +257,8 @@ TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
|
|||||||
* @param aai the admin add incoming request handle
|
* @param aai the admin add incoming request handle
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_BANK_admin_add_incoming_cancel (struct
|
TALER_BANK_admin_add_incoming_cancel (
|
||||||
TALER_BANK_AdminAddIncomingHandle *aai)
|
struct TALER_BANK_AdminAddIncomingHandle *aai)
|
||||||
{
|
{
|
||||||
if (NULL != aai->job)
|
if (NULL != aai->job)
|
||||||
{
|
{
|
||||||
|
@ -78,13 +78,13 @@ GNUNET_NETWORK_STRUCT_END
|
|||||||
* @param[out] buf_size set to number of bytes in @a buf, 0 on error
|
* @param[out] buf_size set to number of bytes in @a buf, 0 on error
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_BANK_prepare_transfer (const char *destination_account_payto_uri,
|
TALER_BANK_prepare_transfer (
|
||||||
const struct TALER_Amount *amount,
|
const char *destination_account_payto_uri,
|
||||||
const char *exchange_base_url,
|
const struct TALER_Amount *amount,
|
||||||
const struct
|
const char *exchange_base_url,
|
||||||
TALER_WireTransferIdentifierRawP *wtid,
|
const struct TALER_WireTransferIdentifierRawP *wtid,
|
||||||
void **buf,
|
void **buf,
|
||||||
size_t *buf_size)
|
size_t *buf_size)
|
||||||
{
|
{
|
||||||
struct WirePackP *wp;
|
struct WirePackP *wp;
|
||||||
size_t d_len = strlen (destination_account_payto_uri) + 1;
|
size_t d_len = strlen (destination_account_payto_uri) + 1;
|
||||||
@ -259,13 +259,13 @@ handle_transfer_finished (void *cls,
|
|||||||
* @return NULL on error
|
* @return NULL on error
|
||||||
*/
|
*/
|
||||||
struct TALER_BANK_TransferHandle *
|
struct TALER_BANK_TransferHandle *
|
||||||
TALER_BANK_transfer (struct GNUNET_CURL_Context *ctx,
|
TALER_BANK_transfer (
|
||||||
const struct
|
struct GNUNET_CURL_Context *ctx,
|
||||||
TALER_BANK_AuthenticationData *auth,
|
const struct TALER_BANK_AuthenticationData *auth,
|
||||||
const void *buf,
|
const void *buf,
|
||||||
size_t buf_size,
|
size_t buf_size,
|
||||||
TALER_BANK_TransferCallback cc,
|
TALER_BANK_TransferCallback cc,
|
||||||
void *cc_cls)
|
void *cc_cls)
|
||||||
{
|
{
|
||||||
struct TALER_BANK_TransferHandle *th;
|
struct TALER_BANK_TransferHandle *th;
|
||||||
json_t *transfer_obj;
|
json_t *transfer_obj;
|
||||||
@ -376,8 +376,7 @@ TALER_BANK_transfer (struct GNUNET_CURL_Context *ctx,
|
|||||||
* @param th the wire transfer request handle
|
* @param th the wire transfer request handle
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_BANK_transfer_cancel (struct
|
TALER_BANK_transfer_cancel (struct TALER_BANK_TransferHandle *th)
|
||||||
TALER_BANK_TransferHandle *th)
|
|
||||||
{
|
{
|
||||||
if (NULL != th->job)
|
if (NULL != th->job)
|
||||||
{
|
{
|
||||||
|
@ -348,15 +348,15 @@ TALER_FAKEBANK_check_credit (struct TALER_FAKEBANK_Handle *h,
|
|||||||
* #GNUNET_SYSERR if the request_uid was reused for a different transfer
|
* #GNUNET_SYSERR if the request_uid was reused for a different transfer
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_FAKEBANK_make_transfer (struct TALER_FAKEBANK_Handle *h,
|
TALER_FAKEBANK_make_transfer (
|
||||||
const char *debit_account,
|
struct TALER_FAKEBANK_Handle *h,
|
||||||
const char *credit_account,
|
const char *debit_account,
|
||||||
const struct TALER_Amount *amount,
|
const char *credit_account,
|
||||||
const struct
|
const struct TALER_Amount *amount,
|
||||||
TALER_WireTransferIdentifierRawP *subject,
|
const struct TALER_WireTransferIdentifierRawP *subject,
|
||||||
const char *exchange_base_url,
|
const char *exchange_base_url,
|
||||||
const struct GNUNET_HashCode *request_uid,
|
const struct GNUNET_HashCode *request_uid,
|
||||||
uint64_t *ret_row_id)
|
uint64_t *ret_row_id)
|
||||||
{
|
{
|
||||||
struct Transaction *t;
|
struct Transaction *t;
|
||||||
|
|
||||||
@ -433,12 +433,12 @@ TALER_FAKEBANK_make_transfer (struct TALER_FAKEBANK_Handle *h,
|
|||||||
* @return serial_id of the transfer
|
* @return serial_id of the transfer
|
||||||
*/
|
*/
|
||||||
uint64_t
|
uint64_t
|
||||||
TALER_FAKEBANK_make_admin_transfer (struct TALER_FAKEBANK_Handle *h,
|
TALER_FAKEBANK_make_admin_transfer (
|
||||||
const char *debit_account,
|
struct TALER_FAKEBANK_Handle *h,
|
||||||
const char *credit_account,
|
const char *debit_account,
|
||||||
const struct TALER_Amount *amount,
|
const char *credit_account,
|
||||||
const struct
|
const struct TALER_Amount *amount,
|
||||||
TALER_ReservePublicKeyP *reserve_pub)
|
const struct TALER_ReservePublicKeyP *reserve_pub)
|
||||||
{
|
{
|
||||||
struct Transaction *t;
|
struct Transaction *t;
|
||||||
|
|
||||||
|
@ -45,12 +45,12 @@ struct FindAccountContext
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if @a section begins with "exchange-wire-", and if
|
* Check if @a section begins with "exchange-account-", and if so if the
|
||||||
* so if the "ENABLE" option is set to "YES". If both are
|
* "PAYTO_URI" is given. If not, a warning is printed, otherwise we also check
|
||||||
* true, call the callback from the context with the
|
* if "ENABLE_CREDIT" or "ENABLE_DEBIT" options are set to "YES" and then call
|
||||||
* rest of the section name.
|
* the callback in @a cls with all of the information gathered.
|
||||||
*
|
*
|
||||||
* @param cls our `struct FindEnabledWireContext`
|
* @param cls our `struct FindAccountContext`
|
||||||
* @param section name of a section in the configuration
|
* @param section name of a section in the configuration
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
|
@ -97,24 +97,34 @@ auditor_iter (void *cls,
|
|||||||
const struct TALER_AuditorSignatureP *sigs;
|
const struct TALER_AuditorSignatureP *sigs;
|
||||||
const struct TALER_DenominationKeyValidityPS *dki;
|
const struct TALER_DenominationKeyValidityPS *dki;
|
||||||
const char *auditor_url;
|
const char *auditor_url;
|
||||||
unsigned int dki_len;
|
uint32_t dki_len;
|
||||||
size_t url_len;
|
size_t url_len;
|
||||||
int iret;
|
int iret;
|
||||||
|
|
||||||
if (GNUNET_OK != GNUNET_DISK_file_size (filename,
|
if (GNUNET_OK !=
|
||||||
&size,
|
GNUNET_DISK_file_size (filename,
|
||||||
GNUNET_YES,
|
&size,
|
||||||
GNUNET_YES))
|
GNUNET_YES,
|
||||||
|
GNUNET_YES))
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
||||||
"Skipping inaccessable auditor information file `%s'\n",
|
"Skipping inaccessable auditor information file `%s'\n",
|
||||||
filename);
|
filename);
|
||||||
return GNUNET_OK;
|
return GNUNET_OK;
|
||||||
}
|
}
|
||||||
if (size < sizeof (struct AuditorFileHeaderP))
|
if (size < sizeof (struct AuditorFileHeaderP))
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
||||||
"Unrecognized size for file `%s', skipping\n",
|
"File size (%llu bytes) too small for file `%s' to contain auditor data. Skipping it.\n",
|
||||||
|
(unsigned long long) size,
|
||||||
|
filename);
|
||||||
|
return GNUNET_OK;
|
||||||
|
}
|
||||||
|
if (size >= GNUNET_MAX_MALLOC_CHECKED)
|
||||||
|
{
|
||||||
|
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
||||||
|
"File size (%llu bytes) too large for file `%s' to contain auditor data. Skipping it.\n",
|
||||||
|
(unsigned long long) size,
|
||||||
filename);
|
filename);
|
||||||
return GNUNET_OK;
|
return GNUNET_OK;
|
||||||
}
|
}
|
||||||
@ -140,35 +150,33 @@ auditor_iter (void *cls,
|
|||||||
GNUNET_free (af);
|
GNUNET_free (af);
|
||||||
return GNUNET_OK;
|
return GNUNET_OK;
|
||||||
}
|
}
|
||||||
if ( (size - sizeof (struct AuditorFileHeaderP)) / dki_len <
|
size -= sizeof (struct AuditorFileHeaderP);
|
||||||
|
if ( (size / dki_len) <=
|
||||||
(sizeof (struct TALER_DenominationKeyValidityPS)
|
(sizeof (struct TALER_DenominationKeyValidityPS)
|
||||||
+ sizeof (struct TALER_AuditorSignatureP)) )
|
+ sizeof (struct TALER_AuditorSignatureP)) )
|
||||||
{
|
{
|
||||||
GNUNET_break_op (0);
|
GNUNET_break_op (0);
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
||||||
"Malformed key file %s\n",
|
"Malformed auditor data file %s (file too short for %u keys)\n",
|
||||||
filename);
|
filename,
|
||||||
|
(unsigned int) dki_len);
|
||||||
GNUNET_free (af);
|
GNUNET_free (af);
|
||||||
return GNUNET_OK;
|
return GNUNET_OK;
|
||||||
}
|
}
|
||||||
url_len = size
|
url_len = size - dki_len * (sizeof (struct TALER_DenominationKeyValidityPS)
|
||||||
- sizeof (struct AuditorFileHeaderP)
|
+ sizeof (struct TALER_AuditorSignatureP));
|
||||||
- dki_len * (sizeof (struct TALER_DenominationKeyValidityPS)
|
|
||||||
+ sizeof (struct TALER_AuditorSignatureP));
|
|
||||||
sigs = (const struct TALER_AuditorSignatureP *) &af[1];
|
sigs = (const struct TALER_AuditorSignatureP *) &af[1];
|
||||||
dki = (const struct TALER_DenominationKeyValidityPS *) &sigs[dki_len];
|
dki = (const struct TALER_DenominationKeyValidityPS *) &sigs[dki_len];
|
||||||
auditor_url = (const char *) &dki[dki_len];
|
auditor_url = (const char *) &dki[dki_len];
|
||||||
if ( (0 == url_len) ||
|
if ('\0' != auditor_url[url_len - 1])
|
||||||
('\0' != auditor_url[url_len - 1]) )
|
|
||||||
{
|
{
|
||||||
GNUNET_break_op (0);
|
GNUNET_break_op (0);
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
||||||
"Malformed key file %s\n",
|
"Malformed auditor data file %s (no 0-terminator)\n",
|
||||||
filename);
|
filename);
|
||||||
GNUNET_free (af);
|
GNUNET_free (af);
|
||||||
return GNUNET_OK;
|
return GNUNET_OK;
|
||||||
}
|
}
|
||||||
/* Ignoring return value to not interrupt the iteration */
|
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
(iret = aic->it (aic->it_cls,
|
(iret = aic->it (aic->it_cls,
|
||||||
&af->apub,
|
&af->apub,
|
||||||
@ -242,64 +250,93 @@ TALER_EXCHANGEDB_auditor_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg,
|
|||||||
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
|
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGEDB_auditor_write (const char *filename,
|
TALER_EXCHANGEDB_auditor_write (
|
||||||
const struct TALER_AuditorPublicKeyP *apub,
|
const char *filename,
|
||||||
const char *auditor_url,
|
const struct TALER_AuditorPublicKeyP *apub,
|
||||||
const struct TALER_AuditorSignatureP *asigs,
|
const char *auditor_url,
|
||||||
const struct TALER_MasterPublicKeyP *mpub,
|
const struct TALER_AuditorSignatureP *asigs,
|
||||||
unsigned int dki_len,
|
const struct TALER_MasterPublicKeyP *mpub,
|
||||||
const struct
|
uint32_t dki_len,
|
||||||
TALER_DenominationKeyValidityPS *dki)
|
const struct TALER_DenominationKeyValidityPS *dki)
|
||||||
{
|
{
|
||||||
struct AuditorFileHeaderP af;
|
|
||||||
struct GNUNET_DISK_FileHandle *fh;
|
struct GNUNET_DISK_FileHandle *fh;
|
||||||
ssize_t wrote;
|
ssize_t wrote;
|
||||||
size_t wsize;
|
size_t wsize;
|
||||||
int ret;
|
|
||||||
int eno;
|
int eno;
|
||||||
|
|
||||||
af.apub = *apub;
|
if (GNUNET_OK !=
|
||||||
af.mpub = *mpub;
|
GNUNET_DISK_directory_create_for_file (filename))
|
||||||
af.dki_len = htonl ((uint32_t) dki_len);
|
{
|
||||||
ret = GNUNET_SYSERR;
|
eno = errno;
|
||||||
|
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
|
||||||
|
"mkdir (for file)",
|
||||||
|
filename);
|
||||||
|
errno = eno;
|
||||||
|
return GNUNET_SYSERR;
|
||||||
|
}
|
||||||
if (NULL == (fh = GNUNET_DISK_file_open
|
if (NULL == (fh = GNUNET_DISK_file_open
|
||||||
(filename,
|
(filename,
|
||||||
GNUNET_DISK_OPEN_WRITE | GNUNET_DISK_OPEN_CREATE
|
GNUNET_DISK_OPEN_WRITE | GNUNET_DISK_OPEN_CREATE
|
||||||
| GNUNET_DISK_OPEN_TRUNCATE,
|
| GNUNET_DISK_OPEN_TRUNCATE,
|
||||||
GNUNET_DISK_PERM_USER_READ
|
GNUNET_DISK_PERM_USER_READ
|
||||||
| GNUNET_DISK_PERM_USER_WRITE)))
|
| GNUNET_DISK_PERM_USER_WRITE)))
|
||||||
goto cleanup;
|
{
|
||||||
wsize = sizeof (struct AuditorFileHeaderP);
|
eno = errno;
|
||||||
if (GNUNET_SYSERR == (wrote = GNUNET_DISK_file_write (fh,
|
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
|
||||||
&af,
|
"open",
|
||||||
wsize)))
|
filename);
|
||||||
goto cleanup;
|
errno = eno;
|
||||||
if (wrote != (ssize_t) wsize)
|
return GNUNET_SYSERR;
|
||||||
goto cleanup;
|
}
|
||||||
|
{
|
||||||
|
struct AuditorFileHeaderP af = {
|
||||||
|
.apub = *apub,
|
||||||
|
.mpub = *mpub,
|
||||||
|
.dki_len = htonl (dki_len)
|
||||||
|
};
|
||||||
|
|
||||||
|
wsize = sizeof (struct AuditorFileHeaderP);
|
||||||
|
if ( (GNUNET_SYSERR == (wrote = GNUNET_DISK_file_write (fh,
|
||||||
|
&af,
|
||||||
|
wsize))) ||
|
||||||
|
(wrote != (ssize_t) wsize) )
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
wsize = dki_len * sizeof (struct TALER_AuditorSignatureP);
|
wsize = dki_len * sizeof (struct TALER_AuditorSignatureP);
|
||||||
if (((ssize_t) wsize) ==
|
if (((ssize_t) wsize) !=
|
||||||
GNUNET_DISK_file_write (fh,
|
GNUNET_DISK_file_write (fh,
|
||||||
asigs,
|
asigs,
|
||||||
wsize))
|
wsize))
|
||||||
ret = GNUNET_OK;
|
goto cleanup;
|
||||||
wsize = dki_len * sizeof (struct TALER_DenominationKeyValidityPS);
|
wsize = dki_len * sizeof (struct TALER_DenominationKeyValidityPS);
|
||||||
if (((ssize_t) wsize) ==
|
if (((ssize_t) wsize) !=
|
||||||
GNUNET_DISK_file_write (fh,
|
GNUNET_DISK_file_write (fh,
|
||||||
dki,
|
dki,
|
||||||
wsize))
|
wsize))
|
||||||
ret = GNUNET_OK;
|
goto cleanup;
|
||||||
wsize = strlen (auditor_url) + 1;
|
wsize = strlen (auditor_url) + 1;
|
||||||
if (((ssize_t) wsize) ==
|
if (((ssize_t) wsize) !=
|
||||||
GNUNET_DISK_file_write (fh,
|
GNUNET_DISK_file_write (fh,
|
||||||
auditor_url,
|
auditor_url,
|
||||||
wsize))
|
wsize))
|
||||||
ret = GNUNET_OK;
|
goto cleanup;
|
||||||
|
GNUNET_assert (GNUNET_OK ==
|
||||||
|
GNUNET_DISK_file_close (fh));
|
||||||
|
return GNUNET_OK;
|
||||||
cleanup:
|
cleanup:
|
||||||
eno = errno;
|
eno = errno;
|
||||||
if (NULL != fh)
|
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
|
||||||
(void) GNUNET_DISK_file_close (fh);
|
"write",
|
||||||
|
filename);
|
||||||
|
GNUNET_break (GNUNET_OK ==
|
||||||
|
GNUNET_DISK_file_close (fh));
|
||||||
|
/* try to remove the file, as it must be malformed */
|
||||||
|
if (0 != unlink (filename))
|
||||||
|
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
|
||||||
|
"unlink",
|
||||||
|
filename);
|
||||||
errno = eno;
|
errno = eno;
|
||||||
return ret;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,39 +58,42 @@ GNUNET_NETWORK_STRUCT_END
|
|||||||
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
|
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGEDB_denomination_key_revoke (const char *revocation_dir,
|
TALER_EXCHANGEDB_denomination_key_revoke (
|
||||||
const struct
|
const char *revocation_dir,
|
||||||
GNUNET_HashCode *denom_hash,
|
const struct GNUNET_HashCode *denom_hash,
|
||||||
const struct
|
const struct TALER_MasterPrivateKeyP *mpriv)
|
||||||
TALER_MasterPrivateKeyP *mpriv)
|
|
||||||
{
|
{
|
||||||
struct TALER_MasterDenominationKeyRevocationPS rm;
|
|
||||||
char *fn;
|
char *fn;
|
||||||
int ret;
|
int ret;
|
||||||
struct RevocationFileP rd;
|
struct RevocationFileP rd;
|
||||||
|
|
||||||
|
{
|
||||||
|
struct TALER_MasterDenominationKeyRevocationPS rm = {
|
||||||
|
.purpose.purpose = htonl (
|
||||||
|
TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED),
|
||||||
|
.purpose.size = htonl (sizeof (rm)),
|
||||||
|
.h_denom_pub = *denom_hash
|
||||||
|
};
|
||||||
|
|
||||||
|
GNUNET_assert (GNUNET_OK ==
|
||||||
|
GNUNET_CRYPTO_eddsa_sign (&mpriv->eddsa_priv,
|
||||||
|
&rm.purpose,
|
||||||
|
&rd.msig.eddsa_signature));
|
||||||
|
}
|
||||||
GNUNET_asprintf (&fn,
|
GNUNET_asprintf (&fn,
|
||||||
"%s" DIR_SEPARATOR_STR
|
"%s" DIR_SEPARATOR_STR
|
||||||
"%s.rev",
|
"%s.rev",
|
||||||
revocation_dir,
|
revocation_dir,
|
||||||
GNUNET_h2s_full (denom_hash));
|
GNUNET_h2s_full (denom_hash));
|
||||||
rm.purpose.purpose = htonl (TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED);
|
|
||||||
rm.purpose.size = htonl (sizeof (rm));
|
|
||||||
rm.h_denom_pub = *denom_hash;
|
|
||||||
GNUNET_assert (GNUNET_OK ==
|
|
||||||
GNUNET_CRYPTO_eddsa_sign (&mpriv->eddsa_priv,
|
|
||||||
&rm.purpose,
|
|
||||||
&rd.msig.eddsa_signature));
|
|
||||||
rd.denom_hash = *denom_hash;
|
rd.denom_hash = *denom_hash;
|
||||||
if (sizeof (rd) !=
|
ret = (sizeof (rd) !=
|
||||||
GNUNET_DISK_fn_write (fn,
|
GNUNET_DISK_fn_write (fn,
|
||||||
&rd,
|
&rd,
|
||||||
sizeof (rd),
|
sizeof (rd),
|
||||||
GNUNET_DISK_PERM_USER_READ
|
GNUNET_DISK_PERM_USER_READ
|
||||||
| GNUNET_DISK_PERM_USER_WRITE))
|
| GNUNET_DISK_PERM_USER_WRITE))
|
||||||
ret = GNUNET_SYSERR;
|
? GNUNET_SYSERR
|
||||||
else
|
: GNUNET_OK;
|
||||||
ret = GNUNET_OK;
|
|
||||||
GNUNET_free (fn);
|
GNUNET_free (fn);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -105,10 +108,9 @@ TALER_EXCHANGEDB_denomination_key_revoke (const char *revocation_dir,
|
|||||||
* #GNUNET_SYSERR upon failure
|
* #GNUNET_SYSERR upon failure
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGEDB_denomination_key_read (const char *filename,
|
TALER_EXCHANGEDB_denomination_key_read (
|
||||||
struct
|
const char *filename,
|
||||||
TALER_EXCHANGEDB_DenominationKey
|
struct TALER_EXCHANGEDB_DenominationKey *dki)
|
||||||
*dki)
|
|
||||||
{
|
{
|
||||||
uint64_t size;
|
uint64_t size;
|
||||||
size_t offset;
|
size_t offset;
|
||||||
@ -129,9 +131,20 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename,
|
|||||||
offset = sizeof (struct TALER_EXCHANGEDB_DenominationKeyInformationP);
|
offset = sizeof (struct TALER_EXCHANGEDB_DenominationKeyInformationP);
|
||||||
if (size <= offset)
|
if (size <= offset)
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
||||||
|
"File size (%llu bytes) too small for file `%s' to contain denomination key data. Skipping it.\n",
|
||||||
|
(unsigned long long) size,
|
||||||
|
filename);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
|
if (size >= GNUNET_MAX_MALLOC_CHECKED)
|
||||||
|
{
|
||||||
|
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
||||||
|
"File size (%llu bytes) too large for file `%s' to contain denomination key data. Skipping it.\n",
|
||||||
|
(unsigned long long) size,
|
||||||
|
filename);
|
||||||
|
return GNUNET_OK;
|
||||||
|
}
|
||||||
data = GNUNET_malloc (size);
|
data = GNUNET_malloc (size);
|
||||||
if (((ssize_t) size) !=
|
if (((ssize_t) size) !=
|
||||||
GNUNET_DISK_fn_read (filename,
|
GNUNET_DISK_fn_read (filename,
|
||||||
@ -160,16 +173,19 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename,
|
|||||||
offset);
|
offset);
|
||||||
GNUNET_free (data);
|
GNUNET_free (data);
|
||||||
if (0 == GNUNET_TIME_absolute_get_remaining
|
if (0 == GNUNET_TIME_absolute_get_remaining
|
||||||
(GNUNET_TIME_absolute_ntoh (
|
(GNUNET_TIME_absolute_ntoh
|
||||||
dki->issue.properties.expire_withdraw)).rel_value_us)
|
(dki->issue.properties.expire_withdraw)).rel_value_us)
|
||||||
{
|
{
|
||||||
|
/* key expired for withdrawal, remove private key to
|
||||||
|
minimize chance of compromise */
|
||||||
if (0 != unlink (filename))
|
if (0 != unlink (filename))
|
||||||
{
|
{
|
||||||
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"unlink",
|
"unlink",
|
||||||
filename);
|
filename);
|
||||||
return GNUNET_OK; /* yes, we had an error, but the file content
|
/* yes, we had an error, but the file content
|
||||||
was fine and is being returned */
|
was fine and is being returned */
|
||||||
|
return GNUNET_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return GNUNET_OK;
|
return GNUNET_OK;
|
||||||
@ -184,26 +200,25 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename,
|
|||||||
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
|
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGEDB_denomination_key_write (const char *filename,
|
TALER_EXCHANGEDB_denomination_key_write (
|
||||||
const struct
|
const char *filename,
|
||||||
TALER_EXCHANGEDB_DenominationKey
|
const struct TALER_EXCHANGEDB_DenominationKey *dki)
|
||||||
*dki)
|
|
||||||
{
|
{
|
||||||
char *priv_enc;
|
|
||||||
size_t priv_enc_size;
|
|
||||||
struct GNUNET_DISK_FileHandle *fh;
|
struct GNUNET_DISK_FileHandle *fh;
|
||||||
ssize_t wrote;
|
ssize_t wrote;
|
||||||
size_t wsize;
|
size_t wsize;
|
||||||
int ret;
|
int eno;
|
||||||
|
|
||||||
fh = NULL;
|
|
||||||
priv_enc_size
|
|
||||||
= GNUNET_CRYPTO_rsa_private_key_encode (dki->denom_priv.rsa_private_key,
|
|
||||||
&priv_enc);
|
|
||||||
ret = GNUNET_SYSERR;
|
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
GNUNET_DISK_directory_create_for_file (filename))
|
GNUNET_DISK_directory_create_for_file (filename))
|
||||||
|
{
|
||||||
|
eno = errno;
|
||||||
|
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
|
||||||
|
"mkdir (for file)",
|
||||||
|
filename);
|
||||||
|
errno = eno;
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
|
}
|
||||||
if (NULL == (fh = GNUNET_DISK_file_open
|
if (NULL == (fh = GNUNET_DISK_file_open
|
||||||
(filename,
|
(filename,
|
||||||
GNUNET_DISK_OPEN_WRITE | GNUNET_DISK_OPEN_CREATE
|
GNUNET_DISK_OPEN_WRITE | GNUNET_DISK_OPEN_CREATE
|
||||||
@ -211,27 +226,53 @@ TALER_EXCHANGEDB_denomination_key_write (const char *filename,
|
|||||||
| GNUNET_DISK_OPEN_FAILIFEXISTS,
|
| GNUNET_DISK_OPEN_FAILIFEXISTS,
|
||||||
GNUNET_DISK_PERM_USER_READ
|
GNUNET_DISK_PERM_USER_READ
|
||||||
| GNUNET_DISK_PERM_USER_WRITE)))
|
| GNUNET_DISK_PERM_USER_WRITE)))
|
||||||
goto cleanup;
|
{
|
||||||
|
eno = errno;
|
||||||
|
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
|
||||||
|
"open",
|
||||||
|
filename);
|
||||||
|
errno = eno;
|
||||||
|
return GNUNET_SYSERR;
|
||||||
|
}
|
||||||
wsize = sizeof (struct TALER_EXCHANGEDB_DenominationKeyInformationP);
|
wsize = sizeof (struct TALER_EXCHANGEDB_DenominationKeyInformationP);
|
||||||
if (GNUNET_SYSERR == (wrote = GNUNET_DISK_file_write (fh,
|
if ( (GNUNET_SYSERR == (wrote = GNUNET_DISK_file_write (fh,
|
||||||
&dki->issue,
|
&dki->issue,
|
||||||
wsize)))
|
wsize))) ||
|
||||||
|
(wrote != (ssize_t) wsize) )
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (wrote != (ssize_t) wsize)
|
{
|
||||||
goto cleanup;
|
char *priv_enc;
|
||||||
if (GNUNET_SYSERR ==
|
size_t priv_enc_size;
|
||||||
(wrote = GNUNET_DISK_file_write (fh,
|
|
||||||
priv_enc,
|
priv_enc_size
|
||||||
priv_enc_size)))
|
= GNUNET_CRYPTO_rsa_private_key_encode (dki->denom_priv.rsa_private_key,
|
||||||
goto cleanup;
|
&priv_enc);
|
||||||
if (wrote != (ssize_t) priv_enc_size)
|
wrote = GNUNET_DISK_file_write (fh,
|
||||||
goto cleanup;
|
priv_enc,
|
||||||
ret = GNUNET_OK;
|
priv_enc_size);
|
||||||
|
GNUNET_free (priv_enc);
|
||||||
|
if ( (GNUNET_SYSERR == wrote) ||
|
||||||
|
(wrote != (ssize_t) priv_enc_size) )
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
GNUNET_assert (GNUNET_OK ==
|
||||||
|
GNUNET_DISK_file_close (fh));
|
||||||
|
return GNUNET_OK;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
GNUNET_free_non_null (priv_enc);
|
eno = errno;
|
||||||
if (NULL != fh)
|
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
|
||||||
(void) GNUNET_DISK_file_close (fh);
|
"write",
|
||||||
return ret;
|
filename);
|
||||||
|
GNUNET_break (GNUNET_OK ==
|
||||||
|
GNUNET_DISK_file_close (fh));
|
||||||
|
/* try to remove the file, as it must be malformed */
|
||||||
|
if (0 != unlink (filename))
|
||||||
|
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
|
||||||
|
"unlink",
|
||||||
|
filename);
|
||||||
|
errno = eno;
|
||||||
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -337,21 +378,22 @@ denomkeys_iterate_topdir_iter (void *cls,
|
|||||||
* as maybe none of the files were well-formed)
|
* as maybe none of the files were well-formed)
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGEDB_denomination_keys_iterate (const char *exchange_base_dir,
|
TALER_EXCHANGEDB_denomination_keys_iterate (
|
||||||
TALER_EXCHANGEDB_DenominationKeyIterator
|
const char *exchange_base_dir,
|
||||||
it,
|
TALER_EXCHANGEDB_DenominationKeyIterator it,
|
||||||
void *it_cls)
|
void *it_cls)
|
||||||
{
|
{
|
||||||
|
struct DenomkeysIterateContext dic = {
|
||||||
|
.it = it,
|
||||||
|
.it_cls = it_cls
|
||||||
|
};
|
||||||
char *dir;
|
char *dir;
|
||||||
struct DenomkeysIterateContext dic;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
GNUNET_asprintf (&dir,
|
GNUNET_asprintf (&dir,
|
||||||
"%s" DIR_SEPARATOR_STR
|
"%s" DIR_SEPARATOR_STR
|
||||||
TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS,
|
TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS,
|
||||||
exchange_base_dir);
|
exchange_base_dir);
|
||||||
dic.it = it;
|
|
||||||
dic.it_cls = it_cls;
|
|
||||||
ret = GNUNET_DISK_directory_scan (dir,
|
ret = GNUNET_DISK_directory_scan (dir,
|
||||||
&denomkeys_iterate_topdir_iter,
|
&denomkeys_iterate_topdir_iter,
|
||||||
&dic);
|
&dic);
|
||||||
@ -401,42 +443,57 @@ revocations_iterate_cb (void *cls,
|
|||||||
{
|
{
|
||||||
struct RevocationsIterateContext *ric = cls;
|
struct RevocationsIterateContext *ric = cls;
|
||||||
struct RevocationFileP rf;
|
struct RevocationFileP rf;
|
||||||
struct TALER_MasterDenominationKeyRevocationPS rm;
|
ssize_t rd;
|
||||||
|
|
||||||
/* Check if revocation is valid... */
|
/* Check if revocation is valid... */
|
||||||
if (sizeof (rf) !=
|
rd = GNUNET_DISK_fn_read (filename,
|
||||||
GNUNET_DISK_fn_read (filename,
|
&rf,
|
||||||
&rf,
|
sizeof (rf));
|
||||||
sizeof (rf)))
|
if (GNUNET_SYSERR == rd)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING,
|
||||||
_ (
|
"read",
|
||||||
"Invalid revocation file `%s' found and ignored (bad size)\n"),
|
filename);
|
||||||
filename);
|
|
||||||
return GNUNET_OK;
|
return GNUNET_OK;
|
||||||
}
|
}
|
||||||
rm.purpose.purpose = htonl (TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED);
|
if (sizeof (rf) != (size_t) rd)
|
||||||
rm.purpose.size = htonl (sizeof (rm));
|
|
||||||
rm.h_denom_pub = rf.denom_hash;
|
|
||||||
if (GNUNET_OK !=
|
|
||||||
GNUNET_CRYPTO_eddsa_verify (
|
|
||||||
TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED,
|
|
||||||
&rm.purpose,
|
|
||||||
&rf.msig.eddsa_signature,
|
|
||||||
&ric->master_pub->eddsa_pub))
|
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
_ (
|
"Invalid revocation file `%s' found and ignored (bad size: %llu)\n",
|
||||||
"Invalid revocation file `%s' found and ignored (bad signature)\n"),
|
filename,
|
||||||
filename);
|
(unsigned long long) rd);
|
||||||
return GNUNET_OK;
|
return GNUNET_OK;
|
||||||
}
|
}
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
|
||||||
"Denomination key `%s' was revoked!\n",
|
{
|
||||||
GNUNET_h2s (&rm.h_denom_pub));
|
struct TALER_MasterDenominationKeyRevocationPS rm = {
|
||||||
return ric->it (ric->it_cls,
|
.purpose.purpose = htonl (
|
||||||
&rm.h_denom_pub,
|
TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED),
|
||||||
&rf.msig);
|
.purpose.size = htonl (sizeof (rm)),
|
||||||
|
.h_denom_pub = rf.denom_hash
|
||||||
|
};
|
||||||
|
|
||||||
|
if (GNUNET_OK !=
|
||||||
|
GNUNET_CRYPTO_eddsa_verify (
|
||||||
|
TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED,
|
||||||
|
&rm.purpose,
|
||||||
|
&rf.msig.eddsa_signature,
|
||||||
|
&ric->master_pub->eddsa_pub))
|
||||||
|
{
|
||||||
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
|
_ (
|
||||||
|
"Invalid revocation file `%s' found and ignored (bad signature)\n"),
|
||||||
|
filename);
|
||||||
|
return GNUNET_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
||||||
|
"Denomination key `%s' was revoked!\n",
|
||||||
|
GNUNET_h2s (&rm.h_denom_pub));
|
||||||
|
return ric->it (ric->it_cls,
|
||||||
|
&rm.h_denom_pub,
|
||||||
|
&rf.msig);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -467,8 +524,11 @@ TALER_EXCHANGEDB_revocations_iterate (const char *revocation_dir,
|
|||||||
|
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
GNUNET_DISK_directory_create (revocation_dir))
|
GNUNET_DISK_directory_create (revocation_dir))
|
||||||
return 0; /* directory doesn't exist and we couldn't even create it,
|
{
|
||||||
clearly means there are no revocations there */
|
/* directory doesn't exist and we couldn't even create it,
|
||||||
|
clearly means there are no revocations there */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return GNUNET_DISK_directory_scan (revocation_dir,
|
return GNUNET_DISK_directory_scan (revocation_dir,
|
||||||
&revocations_iterate_cb,
|
&revocations_iterate_cb,
|
||||||
&ric);
|
&ric);
|
||||||
|
@ -48,9 +48,9 @@ TALER_EXCHANGEDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg)
|
|||||||
"db");
|
"db");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
(void) GNUNET_asprintf (&lib_name,
|
GNUNET_asprintf (&lib_name,
|
||||||
"libtaler_plugin_exchangedb_%s",
|
"libtaler_plugin_exchangedb_%s",
|
||||||
plugin_name);
|
plugin_name);
|
||||||
GNUNET_free (plugin_name);
|
GNUNET_free (plugin_name);
|
||||||
plugin = GNUNET_PLUGIN_load (lib_name,
|
plugin = GNUNET_PLUGIN_load (lib_name,
|
||||||
(void *) cfg);
|
(void *) cfg);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of TALER
|
This file is part of TALER
|
||||||
Copyright (C) 2014, 2015, 2016 Taler Systems SA
|
Copyright (C) 2014, 2015, 2016, 2020 Taler Systems SA
|
||||||
|
|
||||||
TALER is free software; you can redistribute it and/or modify it under the
|
TALER is free software; you can redistribute it and/or modify it under the
|
||||||
terms of the GNU General Public License as published by the Free Software
|
terms of the GNU General Public License as published by the Free Software
|
||||||
@ -112,15 +112,16 @@ TALER_EXCHANGEDB_signing_keys_iterate (const char *exchange_base_dir,
|
|||||||
TALER_EXCHANGEDB_SigningKeyIterator it,
|
TALER_EXCHANGEDB_SigningKeyIterator it,
|
||||||
void *it_cls)
|
void *it_cls)
|
||||||
{
|
{
|
||||||
|
struct SignkeysIterateContext skc = {
|
||||||
|
.it = it,
|
||||||
|
.it_cls = it_cls
|
||||||
|
};
|
||||||
char *signkey_dir;
|
char *signkey_dir;
|
||||||
struct SignkeysIterateContext skc;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
GNUNET_asprintf (&signkey_dir,
|
GNUNET_asprintf (&signkey_dir,
|
||||||
"%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_SIGNING_KEYS,
|
"%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_SIGNING_KEYS,
|
||||||
exchange_base_dir);
|
exchange_base_dir);
|
||||||
skc.it = it;
|
|
||||||
skc.it_cls = it_cls;
|
|
||||||
ret = GNUNET_DISK_directory_scan (signkey_dir,
|
ret = GNUNET_DISK_directory_scan (signkey_dir,
|
||||||
&signkeys_iterate_dir_iter,
|
&signkeys_iterate_dir_iter,
|
||||||
&skc);
|
&skc);
|
||||||
@ -129,30 +130,6 @@ TALER_EXCHANGEDB_signing_keys_iterate (const char *exchange_base_dir,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Obtain the name of the directory we use to store signing
|
|
||||||
* keys created at time @a start.
|
|
||||||
*
|
|
||||||
* @param exchange_directory base director where we store key material
|
|
||||||
* @param start time at which we create the signing key
|
|
||||||
* @return name of the directory we should use, basically "$EXCHANGEDIR/$TIME/";
|
|
||||||
* (valid until next call to this function)
|
|
||||||
*/
|
|
||||||
static char *
|
|
||||||
get_signkey_file (const char *exchange_directory,
|
|
||||||
struct GNUNET_TIME_Absolute start)
|
|
||||||
{
|
|
||||||
char *fn;
|
|
||||||
|
|
||||||
GNUNET_asprintf (&fn,
|
|
||||||
"%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_SIGNING_KEYS
|
|
||||||
DIR_SEPARATOR_STR "%llu",
|
|
||||||
exchange_directory,
|
|
||||||
(unsigned long long) start.abs_value_us);
|
|
||||||
return fn;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exports a signing key to the given file.
|
* Exports a signing key to the given file.
|
||||||
*
|
*
|
||||||
@ -171,18 +148,31 @@ TALER_EXCHANGEDB_signing_key_write (const char *exchange_base_dir,
|
|||||||
char *skf;
|
char *skf;
|
||||||
ssize_t nwrite;
|
ssize_t nwrite;
|
||||||
|
|
||||||
skf = get_signkey_file (exchange_base_dir,
|
GNUNET_asprintf (&skf,
|
||||||
start);
|
"%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_SIGNING_KEYS
|
||||||
|
DIR_SEPARATOR_STR "%llu",
|
||||||
|
exchange_base_dir,
|
||||||
|
(unsigned long long) start.abs_value_us);
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
GNUNET_DISK_directory_create_for_file (skf))
|
GNUNET_DISK_directory_create_for_file (skf))
|
||||||
|
{
|
||||||
|
int eno;
|
||||||
|
|
||||||
|
eno = errno;
|
||||||
|
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
|
||||||
|
"mkdir (for file)",
|
||||||
|
skf);
|
||||||
|
errno = eno;
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
|
}
|
||||||
nwrite = GNUNET_DISK_fn_write (skf,
|
nwrite = GNUNET_DISK_fn_write (skf,
|
||||||
ski,
|
ski,
|
||||||
sizeof (struct
|
sizeof (struct
|
||||||
TALER_EXCHANGEDB_PrivateSigningKeyInformationP),
|
TALER_EXCHANGEDB_PrivateSigningKeyInformationP),
|
||||||
GNUNET_DISK_PERM_USER_WRITE
|
GNUNET_DISK_PERM_USER_WRITE
|
||||||
| GNUNET_DISK_PERM_USER_READ);
|
| GNUNET_DISK_PERM_USER_READ);
|
||||||
if (sizeof (struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP) != nwrite)
|
if (sizeof (struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP) !=
|
||||||
|
(size_t) nwrite)
|
||||||
{
|
{
|
||||||
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"write",
|
"write",
|
||||||
|
@ -33,12 +33,10 @@
|
|||||||
* @return #GNUNET_OK on success, #GNUNET_SYSERR on errors
|
* @return #GNUNET_OK on success, #GNUNET_SYSERR on errors
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGEDB_calculate_transaction_list_totals (struct
|
TALER_EXCHANGEDB_calculate_transaction_list_totals (
|
||||||
TALER_EXCHANGEDB_TransactionList
|
struct TALER_EXCHANGEDB_TransactionList *tl,
|
||||||
*tl,
|
const struct TALER_Amount *off,
|
||||||
const struct
|
struct TALER_Amount *ret)
|
||||||
TALER_Amount *off,
|
|
||||||
struct TALER_Amount *ret)
|
|
||||||
{
|
{
|
||||||
struct TALER_Amount spent = *off;
|
struct TALER_Amount spent = *off;
|
||||||
struct TALER_Amount refunded;
|
struct TALER_Amount refunded;
|
||||||
|
@ -1570,13 +1570,11 @@ postgres_preflight (void *cls,
|
|||||||
* @return status of the query
|
* @return status of the query
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_denomination_info (void *cls,
|
postgres_insert_denomination_info (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
TALER_DenominationPublicKey *denom_pub,
|
const struct TALER_DenominationPublicKey *denom_pub,
|
||||||
const struct
|
const struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue)
|
||||||
TALER_EXCHANGEDB_DenominationKeyInformationP
|
|
||||||
*issue)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (&issue->properties.denom_hash),
|
GNUNET_PQ_query_param_auto_from_type (&issue->properties.denom_hash),
|
||||||
@ -1626,12 +1624,11 @@ postgres_insert_denomination_info (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_get_denomination_info (void *cls,
|
postgres_get_denomination_info (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct GNUNET_HashCode *denom_pub_hash,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
struct
|
const struct GNUNET_HashCode *denom_pub_hash,
|
||||||
TALER_EXCHANGEDB_DenominationKeyInformationP *
|
struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue)
|
||||||
issue)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
@ -2015,11 +2012,11 @@ postgres_reserves_in_insert (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_get_latest_reserve_in_reference (void *cls,
|
postgres_get_latest_reserve_in_reference (
|
||||||
struct TALER_EXCHANGEDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
const char *exchange_account_name,
|
const char *exchange_account_name,
|
||||||
uint64_t *wire_reference)
|
uint64_t *wire_reference)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_string (exchange_account_name),
|
GNUNET_PQ_query_param_string (exchange_account_name),
|
||||||
@ -2052,11 +2049,11 @@ postgres_get_latest_reserve_in_reference (void *cls,
|
|||||||
* @return statement execution status
|
* @return statement execution status
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_get_withdraw_info (void *cls,
|
postgres_get_withdraw_info (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct GNUNET_HashCode *h_blind,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
struct TALER_EXCHANGEDB_CollectableBlindcoin *
|
const struct GNUNET_HashCode *h_blind,
|
||||||
collectable)
|
struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable)
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam no_params[] = {
|
struct GNUNET_PQ_QueryParam no_params[] = {
|
||||||
@ -2106,11 +2103,10 @@ postgres_get_withdraw_info (void *cls,
|
|||||||
* @return query execution status
|
* @return query execution status
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_withdraw_info (void *cls,
|
postgres_insert_withdraw_info (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
TALER_EXCHANGEDB_CollectableBlindcoin *
|
const struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable)
|
||||||
collectable)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct TALER_EXCHANGEDB_Reserve reserve;
|
struct TALER_EXCHANGEDB_Reserve reserve;
|
||||||
@ -2949,14 +2945,14 @@ match_deposit_cb (void *cls,
|
|||||||
* number of rows processed, 0 if none exist
|
* number of rows processed, 0 if none exist
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_iterate_matching_deposits (void *cls,
|
postgres_iterate_matching_deposits (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct GNUNET_HashCode *h_wire,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
const struct
|
const struct GNUNET_HashCode *h_wire,
|
||||||
TALER_MerchantPublicKeyP *merchant_pub,
|
const struct TALER_MerchantPublicKeyP *merchant_pub,
|
||||||
TALER_EXCHANGEDB_DepositIterator deposit_cb,
|
TALER_EXCHANGEDB_DepositIterator deposit_cb,
|
||||||
void *deposit_cb_cls,
|
void *deposit_cb_cls,
|
||||||
uint32_t limit)
|
uint32_t limit)
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -3040,11 +3036,11 @@ postgres_get_known_coin (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_get_coin_denomination (void *cls,
|
postgres_get_coin_denomination (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
struct GNUNET_HashCode *denom_hash)
|
struct GNUNET_HashCode *denom_hash)
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pc = cls;
|
struct PostgresClosure *pc = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -3347,16 +3343,14 @@ get_refunds_cb (void *cls,
|
|||||||
* @return query result status
|
* @return query result status
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_refunds_by_coin (void *cls,
|
postgres_select_refunds_by_coin (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
const struct
|
const struct TALER_MerchantPublicKeyP *merchant_pub,
|
||||||
TALER_MerchantPublicKeyP *merchant_pub,
|
const struct GNUNET_HashCode *h_contract,
|
||||||
const struct GNUNET_HashCode *h_contract,
|
TALER_EXCHANGEDB_RefundCoinCallback cb,
|
||||||
TALER_EXCHANGEDB_RefundCoinCallback
|
void *cb_cls)
|
||||||
cb,
|
|
||||||
void *cb_cls)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
@ -3481,10 +3475,10 @@ postgres_get_melt_index (void *cls,
|
|||||||
* @return query status for the transaction
|
* @return query status for the transaction
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_melt (void *cls,
|
postgres_insert_melt (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
TALER_EXCHANGEDB_Refresh *refresh_session)
|
const struct TALER_EXCHANGEDB_Refresh *refresh_session)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (&refresh_session->rc),
|
GNUNET_PQ_query_param_auto_from_type (&refresh_session->rc),
|
||||||
@ -3518,15 +3512,15 @@ postgres_insert_melt (void *cls,
|
|||||||
* @return query status for the transaction
|
* @return query status for the transaction
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_refresh_reveal (void *cls,
|
postgres_insert_refresh_reveal (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct TALER_RefreshCommitmentP *rc,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint32_t num_rrcs,
|
const struct TALER_RefreshCommitmentP *rc,
|
||||||
const struct
|
uint32_t num_rrcs,
|
||||||
TALER_EXCHANGEDB_RefreshRevealedCoin *rrcs,
|
const struct TALER_EXCHANGEDB_RefreshRevealedCoin *rrcs,
|
||||||
unsigned int num_tprivs,
|
unsigned int num_tprivs,
|
||||||
const struct TALER_TransferPrivateKeyP *tprivs,
|
const struct TALER_TransferPrivateKeyP *tprivs,
|
||||||
const struct TALER_TransferPublicKeyP *tp)
|
const struct TALER_TransferPublicKeyP *tp)
|
||||||
{
|
{
|
||||||
(void) cls;
|
(void) cls;
|
||||||
if (TALER_CNC_KAPPA != num_tprivs + 1)
|
if (TALER_CNC_KAPPA != num_tprivs + 1)
|
||||||
@ -4415,12 +4409,12 @@ struct Work
|
|||||||
* @return database transaction status
|
* @return database transaction status
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_get_coin_transactions (void *cls,
|
postgres_get_coin_transactions (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
int include_recoup,
|
int include_recoup,
|
||||||
struct TALER_EXCHANGEDB_TransactionList **tlp)
|
struct TALER_EXCHANGEDB_TransactionList **tlp)
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
static const struct Work work_op[] = {
|
static const struct Work work_op[] = {
|
||||||
@ -4609,12 +4603,12 @@ handle_wt_result (void *cls,
|
|||||||
* @return query status of the transaction
|
* @return query status of the transaction
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_lookup_wire_transfer (void *cls,
|
postgres_lookup_wire_transfer (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
TALER_WireTransferIdentifierRawP *wtid,
|
const struct TALER_WireTransferIdentifierRawP *wtid,
|
||||||
TALER_EXCHANGEDB_AggregationDataCallback cb,
|
TALER_EXCHANGEDB_AggregationDataCallback cb,
|
||||||
void *cb_cls)
|
void *cb_cls)
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -4656,18 +4650,15 @@ postgres_lookup_wire_transfer (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
- */
|
- */
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_lookup_transfer_by_deposit (void *cls,
|
postgres_lookup_transfer_by_deposit (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
GNUNET_HashCode *h_contract_terms,
|
const struct GNUNET_HashCode *h_contract_terms,
|
||||||
const struct GNUNET_HashCode *h_wire,
|
const struct GNUNET_HashCode *h_wire,
|
||||||
const struct
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
const struct TALER_MerchantPublicKeyP *merchant_pub,
|
||||||
const struct
|
TALER_EXCHANGEDB_WireTransferByCoinCallback cb,
|
||||||
TALER_MerchantPublicKeyP *merchant_pub,
|
void *cb_cls)
|
||||||
TALER_EXCHANGEDB_WireTransferByCoinCallback
|
|
||||||
cb,
|
|
||||||
void *cb_cls)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
@ -4761,11 +4752,11 @@ postgres_lookup_transfer_by_deposit (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_aggregation_tracking (void *cls,
|
postgres_insert_aggregation_tracking (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
TALER_WireTransferIdentifierRawP *wtid,
|
const struct TALER_WireTransferIdentifierRawP *wtid,
|
||||||
unsigned long long deposit_serial_id)
|
unsigned long long deposit_serial_id)
|
||||||
{
|
{
|
||||||
uint64_t rid = deposit_serial_id;
|
uint64_t rid = deposit_serial_id;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -5055,16 +5046,15 @@ postgres_get_expired_reserves (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_reserve_closed (void *cls,
|
postgres_insert_reserve_closed (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
struct GNUNET_TIME_Absolute execution_date,
|
struct GNUNET_TIME_Absolute execution_date,
|
||||||
const char *receiver_account,
|
const char *receiver_account,
|
||||||
const struct
|
const struct TALER_WireTransferIdentifierRawP *wtid,
|
||||||
TALER_WireTransferIdentifierRawP *wtid,
|
const struct TALER_Amount *amount_with_fee,
|
||||||
const struct TALER_Amount *amount_with_fee,
|
const struct TALER_Amount *closing_fee)
|
||||||
const struct TALER_Amount *closing_fee)
|
|
||||||
{
|
{
|
||||||
struct TALER_EXCHANGEDB_Reserve reserve;
|
struct TALER_EXCHANGEDB_Reserve reserve;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -5280,14 +5270,14 @@ postgres_start_deferred_wire_out (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_store_wire_transfer_out (void *cls,
|
postgres_store_wire_transfer_out (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
struct GNUNET_TIME_Absolute date,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
const struct
|
struct GNUNET_TIME_Absolute date,
|
||||||
TALER_WireTransferIdentifierRawP *wtid,
|
const struct TALER_WireTransferIdentifierRawP *wtid,
|
||||||
const json_t *wire_account,
|
const json_t *wire_account,
|
||||||
const char *exchange_account_section,
|
const char *exchange_account_section,
|
||||||
const struct TALER_Amount *amount)
|
const struct TALER_Amount *amount)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
TALER_PQ_query_param_absolute_time (&date),
|
TALER_PQ_query_param_absolute_time (&date),
|
||||||
@ -5521,12 +5511,12 @@ deposit_serial_helper_cb (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_deposits_above_serial_id (void *cls,
|
postgres_select_deposits_above_serial_id (
|
||||||
struct TALER_EXCHANGEDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_DepositCallback cb,
|
TALER_EXCHANGEDB_DepositCallback cb,
|
||||||
void *cb_cls)
|
void *cb_cls)
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -5660,13 +5650,12 @@ refreshs_serial_helper_cb (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_refreshes_above_serial_id (void *cls,
|
postgres_select_refreshes_above_serial_id (
|
||||||
struct TALER_EXCHANGEDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_RefreshesCallback
|
TALER_EXCHANGEDB_RefreshesCallback cb,
|
||||||
cb,
|
void *cb_cls)
|
||||||
void *cb_cls)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -5799,12 +5788,12 @@ refunds_serial_helper_cb (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_refunds_above_serial_id (void *cls,
|
postgres_select_refunds_above_serial_id (
|
||||||
struct TALER_EXCHANGEDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_RefundCallback cb,
|
TALER_EXCHANGEDB_RefundCallback cb,
|
||||||
void *cb_cls)
|
void *cb_cls)
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -5934,13 +5923,12 @@ reserves_in_serial_helper_cb (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_reserves_in_above_serial_id (void *cls,
|
postgres_select_reserves_in_above_serial_id (
|
||||||
struct TALER_EXCHANGEDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_ReserveInCallback
|
TALER_EXCHANGEDB_ReserveInCallback cb,
|
||||||
cb,
|
void *cb_cls)
|
||||||
void *cb_cls)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -5979,15 +5967,13 @@ postgres_select_reserves_in_above_serial_id (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_reserves_in_above_serial_id_by_account (void *cls,
|
postgres_select_reserves_in_above_serial_id_by_account (
|
||||||
struct
|
void *cls,
|
||||||
TALER_EXCHANGEDB_Session
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
*session,
|
const char *account_name,
|
||||||
const char *account_name,
|
uint64_t serial_id,
|
||||||
uint64_t serial_id,
|
TALER_EXCHANGEDB_ReserveInCallback cb,
|
||||||
TALER_EXCHANGEDB_ReserveInCallback
|
void *cb_cls)
|
||||||
cb,
|
|
||||||
void *cb_cls)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -6122,13 +6108,12 @@ reserves_out_serial_helper_cb (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_withdrawals_above_serial_id (void *cls,
|
postgres_select_withdrawals_above_serial_id (
|
||||||
struct TALER_EXCHANGEDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_WithdrawCallback
|
TALER_EXCHANGEDB_WithdrawCallback cb,
|
||||||
cb,
|
void *cb_cls)
|
||||||
void *cb_cls)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -6254,13 +6239,12 @@ wire_out_serial_helper_cb (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_wire_out_above_serial_id (void *cls,
|
postgres_select_wire_out_above_serial_id (
|
||||||
struct TALER_EXCHANGEDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_WireTransferOutCallback
|
TALER_EXCHANGEDB_WireTransferOutCallback cb,
|
||||||
cb,
|
void *cb_cls)
|
||||||
void *cb_cls)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -6299,15 +6283,13 @@ postgres_select_wire_out_above_serial_id (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_wire_out_above_serial_id_by_account (void *cls,
|
postgres_select_wire_out_above_serial_id_by_account (
|
||||||
struct
|
void *cls,
|
||||||
TALER_EXCHANGEDB_Session *
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
session,
|
const char *account_name,
|
||||||
const char *account_name,
|
uint64_t serial_id,
|
||||||
uint64_t serial_id,
|
TALER_EXCHANGEDB_WireTransferOutCallback cb,
|
||||||
TALER_EXCHANGEDB_WireTransferOutCallback
|
void *cb_cls)
|
||||||
cb,
|
|
||||||
void *cb_cls)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -6453,12 +6435,12 @@ recoup_serial_helper_cb (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_recoup_above_serial_id (void *cls,
|
postgres_select_recoup_above_serial_id (
|
||||||
struct TALER_EXCHANGEDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_RecoupCallback cb,
|
TALER_EXCHANGEDB_RecoupCallback cb,
|
||||||
void *cb_cls)
|
void *cb_cls)
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -6603,13 +6585,12 @@ recoup_refresh_serial_helper_cb (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_recoup_refresh_above_serial_id (void *cls,
|
postgres_select_recoup_refresh_above_serial_id (
|
||||||
struct TALER_EXCHANGEDB_Session
|
void *cls,
|
||||||
*session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_RecoupRefreshCallback
|
TALER_EXCHANGEDB_RecoupRefreshCallback cb,
|
||||||
cb,
|
void *cb_cls)
|
||||||
void *cb_cls)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -6743,13 +6724,12 @@ reserve_closed_serial_helper_cb (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_select_reserve_closed_above_serial_id (void *cls,
|
postgres_select_reserve_closed_above_serial_id (
|
||||||
struct TALER_EXCHANGEDB_Session
|
void *cls,
|
||||||
*session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_ReserveClosedCallback
|
TALER_EXCHANGEDB_ReserveClosedCallback cb,
|
||||||
cb,
|
void *cb_cls)
|
||||||
void *cb_cls)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
@ -6793,18 +6773,16 @@ postgres_select_reserve_closed_above_serial_id (void *cls,
|
|||||||
* @return transaction result status
|
* @return transaction result status
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_recoup_request (void *cls,
|
postgres_insert_recoup_request (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
const struct TALER_CoinPublicInfo *coin,
|
const struct TALER_CoinPublicInfo *coin,
|
||||||
const struct
|
const struct TALER_CoinSpendSignatureP *coin_sig,
|
||||||
TALER_CoinSpendSignatureP *coin_sig,
|
const struct TALER_DenominationBlindingKeyP *coin_blind,
|
||||||
const struct
|
const struct TALER_Amount *amount,
|
||||||
TALER_DenominationBlindingKeyP *coin_blind,
|
const struct GNUNET_HashCode *h_blind_ev,
|
||||||
const struct TALER_Amount *amount,
|
struct GNUNET_TIME_Absolute timestamp)
|
||||||
const struct GNUNET_HashCode *h_blind_ev,
|
|
||||||
struct GNUNET_TIME_Absolute timestamp)
|
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_TIME_Absolute expiry;
|
struct GNUNET_TIME_Absolute expiry;
|
||||||
@ -6888,20 +6866,15 @@ postgres_insert_recoup_request (void *cls,
|
|||||||
* @return transaction result status
|
* @return transaction result status
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_recoup_refresh_request (void *cls,
|
postgres_insert_recoup_refresh_request (
|
||||||
struct TALER_EXCHANGEDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
const struct
|
const struct TALER_CoinPublicInfo *coin,
|
||||||
TALER_CoinPublicInfo *coin,
|
const struct TALER_CoinSpendSignatureP *coin_sig,
|
||||||
const struct
|
const struct TALER_DenominationBlindingKeyP *coin_blind,
|
||||||
TALER_CoinSpendSignatureP *coin_sig,
|
const struct TALER_Amount *amount,
|
||||||
const struct
|
const struct GNUNET_HashCode *h_blind_ev,
|
||||||
TALER_DenominationBlindingKeyP *
|
struct GNUNET_TIME_Absolute timestamp)
|
||||||
coin_blind,
|
|
||||||
const struct TALER_Amount *amount,
|
|
||||||
const struct
|
|
||||||
GNUNET_HashCode *h_blind_ev,
|
|
||||||
struct GNUNET_TIME_Absolute timestamp)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (&coin->coin_pub),
|
GNUNET_PQ_query_param_auto_from_type (&coin->coin_pub),
|
||||||
@ -7007,13 +6980,11 @@ postgres_get_old_coin_by_h_blind (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_insert_denomination_revocation (void *cls,
|
postgres_insert_denomination_revocation (
|
||||||
struct TALER_EXCHANGEDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
const struct
|
const struct GNUNET_HashCode *denom_pub_hash,
|
||||||
GNUNET_HashCode *denom_pub_hash,
|
const struct TALER_MasterSignatureP *master_sig)
|
||||||
const struct
|
|
||||||
TALER_MasterSignatureP *master_sig)
|
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (denom_pub_hash),
|
GNUNET_PQ_query_param_auto_from_type (denom_pub_hash),
|
||||||
@ -7040,12 +7011,12 @@ postgres_insert_denomination_revocation (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
postgres_get_denomination_revocation (void *cls,
|
postgres_get_denomination_revocation (
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
GNUNET_HashCode *denom_pub_hash,
|
const struct GNUNET_HashCode *denom_pub_hash,
|
||||||
struct TALER_MasterSignatureP *master_sig,
|
struct TALER_MasterSignatureP *master_sig,
|
||||||
uint64_t *rowid)
|
uint64_t *rowid)
|
||||||
{
|
{
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_QueryParam params[] = {
|
||||||
GNUNET_PQ_query_param_auto_from_type (denom_pub_hash),
|
GNUNET_PQ_query_param_auto_from_type (denom_pub_hash),
|
||||||
|
@ -38,10 +38,10 @@
|
|||||||
* @param exchange_url base URL of the exchange's API
|
* @param exchange_url base URL of the exchange's API
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_AUDITORDB_ExchangeCallback)(void *cls,
|
(*TALER_AUDITORDB_ExchangeCallback)(
|
||||||
const struct
|
void *cls,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const char *exchange_url);
|
const char *exchange_url);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -56,10 +56,9 @@ typedef void
|
|||||||
* #GNUNET_SYSERR or other values on error.
|
* #GNUNET_SYSERR or other values on error.
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_AUDITORDB_DenominationInfoDataCallback)(void *cls,
|
(*TALER_AUDITORDB_DenominationInfoDataCallback)(
|
||||||
const struct
|
void *cls,
|
||||||
TALER_DenominationKeyValidityPS
|
const struct TALER_DenominationKeyValidityPS *issue);
|
||||||
*issue);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,19 +77,12 @@ typedef int
|
|||||||
* #GNUNET_SYSERR or other values on error.
|
* #GNUNET_SYSERR or other values on error.
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_AUDITORDB_HistoricDenominationRevenueDataCallback)(void *cls,
|
(*TALER_AUDITORDB_HistoricDenominationRevenueDataCallback)(
|
||||||
const struct
|
void *cls,
|
||||||
GNUNET_HashCode *
|
const struct GNUNET_HashCode *denom_pub_hash,
|
||||||
denom_pub_hash,
|
struct GNUNET_TIME_Absolute revenue_timestamp,
|
||||||
struct
|
const struct TALER_Amount *revenue_balance,
|
||||||
GNUNET_TIME_Absolute
|
const struct TALER_Amount *loss_balance);
|
||||||
revenue_timestamp,
|
|
||||||
const struct
|
|
||||||
TALER_Amount *
|
|
||||||
revenue_balance,
|
|
||||||
const struct
|
|
||||||
TALER_Amount *
|
|
||||||
loss_balance);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -107,16 +99,11 @@ typedef int
|
|||||||
* #GNUNET_SYSERR or other values on error.
|
* #GNUNET_SYSERR or other values on error.
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_AUDITORDB_HistoricReserveRevenueDataCallback)(void *cls,
|
(*TALER_AUDITORDB_HistoricReserveRevenueDataCallback)(
|
||||||
struct
|
void *cls,
|
||||||
GNUNET_TIME_Absolute
|
struct GNUNET_TIME_Absolute start_time,
|
||||||
start_time,
|
struct GNUNET_TIME_Absolute end_time,
|
||||||
struct
|
const struct TALER_Amount *reserve_profits);
|
||||||
GNUNET_TIME_Absolute
|
|
||||||
end_time,
|
|
||||||
const struct
|
|
||||||
TALER_Amount *
|
|
||||||
reserve_profits);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -379,11 +366,10 @@ struct TALER_AUDITORDB_DepositConfirmation
|
|||||||
* @param dc the deposit confirmation itself
|
* @param dc the deposit confirmation itself
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_AUDITORDB_DepositConfirmationCallback)(void *cls,
|
(*TALER_AUDITORDB_DepositConfirmationCallback)(
|
||||||
uint64_t serial_id,
|
void *cls,
|
||||||
const struct
|
uint64_t serial_id,
|
||||||
TALER_AUDITORDB_DepositConfirmation
|
const struct TALER_AUDITORDB_DepositConfirmation *dc);
|
||||||
*dc);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -553,10 +539,10 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return query result status
|
* @return query result status
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_exchange_signkey)(void *cls,
|
(*insert_exchange_signkey)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_AUDITORDB_ExchangeSigningKey *sk);
|
const struct TALER_AUDITORDB_ExchangeSigningKey *sk);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -568,10 +554,10 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return query result status
|
* @return query result status
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_deposit_confirmation)(void *cls,
|
(*insert_deposit_confirmation)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_AUDITORDB_DepositConfirmation *dc);
|
const struct TALER_AUDITORDB_DepositConfirmation *dc);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -587,13 +573,13 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return query result status
|
* @return query result status
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_deposit_confirmations)(void *cls,
|
(*get_deposit_confirmations)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_public_key,
|
const struct TALER_MasterPublicKeyP *master_public_key,
|
||||||
uint64_t start_id,
|
uint64_t start_id,
|
||||||
TALER_AUDITORDB_DepositConfirmationCallback cb,
|
TALER_AUDITORDB_DepositConfirmationCallback cb,
|
||||||
void *cb_cls);
|
void *cb_cls);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -607,10 +593,10 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return status of database operation
|
* @return status of database operation
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_denomination_info)(void *cls,
|
(*insert_denomination_info)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_DenominationKeyValidityPS *issue);
|
const struct TALER_DenominationKeyValidityPS *issue);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -642,12 +628,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_auditor_progress_coin)(void *cls,
|
(*insert_auditor_progress_coin)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_AUDITORDB_ProgressPointCoin *ppc);
|
||||||
TALER_AUDITORDB_ProgressPointCoin *ppc);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -661,12 +646,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_auditor_progress_coin)(void *cls,
|
(*update_auditor_progress_coin)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_AUDITORDB_ProgressPointCoin *ppc);
|
||||||
TALER_AUDITORDB_ProgressPointCoin *ppc);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -695,12 +679,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_auditor_progress_reserve)(void *cls,
|
(*insert_auditor_progress_reserve)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_AUDITORDB_ProgressPointReserve *ppr);
|
||||||
TALER_AUDITORDB_ProgressPointReserve *ppr);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -714,12 +697,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_auditor_progress_reserve)(void *cls,
|
(*update_auditor_progress_reserve)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_AUDITORDB_ProgressPointReserve *ppr);
|
||||||
TALER_AUDITORDB_ProgressPointReserve *ppr);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -732,12 +714,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_auditor_progress_reserve)(void *cls,
|
(*get_auditor_progress_reserve)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct TALER_AUDITORDB_ProgressPointReserve *
|
struct TALER_AUDITORDB_ProgressPointReserve *ppr);
|
||||||
ppr);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert information about the auditor's progress with an exchange's
|
* Insert information about the auditor's progress with an exchange's
|
||||||
@ -750,15 +731,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_auditor_progress_deposit_confirmation)(void *cls,
|
(*insert_auditor_progress_deposit_confirmation)(
|
||||||
struct TALER_AUDITORDB_Session
|
void *cls,
|
||||||
*session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *
|
const struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc);
|
||||||
master_pub,
|
|
||||||
const struct
|
|
||||||
TALER_AUDITORDB_ProgressPointDepositConfirmation
|
|
||||||
*ppdc);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -772,15 +749,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_auditor_progress_deposit_confirmation)(void *cls,
|
(*update_auditor_progress_deposit_confirmation)(
|
||||||
struct TALER_AUDITORDB_Session
|
void *cls,
|
||||||
*session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *
|
const struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc);
|
||||||
master_pub,
|
|
||||||
const struct
|
|
||||||
TALER_AUDITORDB_ProgressPointDepositConfirmation
|
|
||||||
*ppdc);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -793,15 +766,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_auditor_progress_deposit_confirmation)(void *cls,
|
(*get_auditor_progress_deposit_confirmation)(
|
||||||
struct TALER_AUDITORDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *
|
struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc);
|
||||||
master_pub,
|
|
||||||
struct
|
|
||||||
TALER_AUDITORDB_ProgressPointDepositConfirmation
|
|
||||||
*ppdc);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -815,13 +784,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_auditor_progress_aggregation)(void *cls,
|
(*insert_auditor_progress_aggregation)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_AUDITORDB_ProgressPointAggregation *ppa);
|
||||||
TALER_AUDITORDB_ProgressPointAggregation
|
|
||||||
*ppa);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -835,13 +802,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_auditor_progress_aggregation)(void *cls,
|
(*update_auditor_progress_aggregation)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_AUDITORDB_ProgressPointAggregation *ppa);
|
||||||
TALER_AUDITORDB_ProgressPointAggregation
|
|
||||||
*ppa);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -854,13 +819,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_auditor_progress_aggregation)(void *cls,
|
(*get_auditor_progress_aggregation)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct
|
struct TALER_AUDITORDB_ProgressPointAggregation *ppa);
|
||||||
TALER_AUDITORDB_ProgressPointAggregation *
|
|
||||||
ppa);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -877,17 +840,14 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_wire_auditor_account_progress)(void *cls,
|
(*insert_wire_auditor_account_progress)(
|
||||||
struct TALER_AUDITORDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const char *account_name,
|
||||||
const char *account_name,
|
const struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
|
||||||
const struct
|
uint64_t in_wire_off,
|
||||||
TALER_AUDITORDB_WireAccountProgressPoint
|
uint64_t out_wire_off);
|
||||||
*pp,
|
|
||||||
uint64_t in_wire_off,
|
|
||||||
uint64_t out_wire_off);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -904,17 +864,14 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_wire_auditor_account_progress)(void *cls,
|
(*update_wire_auditor_account_progress)(
|
||||||
struct TALER_AUDITORDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_AUDITORDB_Session *session,
|
||||||
const struct
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const char *account_name,
|
||||||
const char *account_name,
|
const struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
|
||||||
const struct
|
uint64_t in_wire_off,
|
||||||
TALER_AUDITORDB_WireAccountProgressPoint
|
uint64_t out_wire_off);
|
||||||
*pp,
|
|
||||||
uint64_t in_wire_off,
|
|
||||||
uint64_t out_wire_off);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -930,16 +887,14 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_wire_auditor_account_progress)(void *cls,
|
(*get_wire_auditor_account_progress)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const char *account_name,
|
const char *account_name,
|
||||||
struct
|
struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
|
||||||
TALER_AUDITORDB_WireAccountProgressPoint
|
uint64_t *in_wire_off,
|
||||||
*pp,
|
uint64_t *out_wire_off);
|
||||||
uint64_t *in_wire_off,
|
|
||||||
uint64_t *out_wire_off);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -954,12 +909,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_wire_auditor_progress)(void *cls,
|
(*insert_wire_auditor_progress)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_AUDITORDB_WireProgressPoint *pp);
|
||||||
TALER_AUDITORDB_WireProgressPoint *pp);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -974,12 +928,11 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*update_wire_auditor_progress)(void *cls,
|
(*update_wire_auditor_progress)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_AUDITORDB_WireProgressPoint *pp);
|
||||||
TALER_AUDITORDB_WireProgressPoint *pp);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1394,16 +1347,14 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_historic_denom_revenue)(void *cls,
|
(*insert_historic_denom_revenue)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct GNUNET_HashCode *denom_pub_hash,
|
const struct GNUNET_HashCode *denom_pub_hash,
|
||||||
struct GNUNET_TIME_Absolute
|
struct GNUNET_TIME_Absolute revenue_timestamp,
|
||||||
revenue_timestamp,
|
const struct TALER_Amount *revenue_balance,
|
||||||
const struct TALER_Amount *revenue_balance,
|
const struct TALER_Amount *recoup_loss_balance);
|
||||||
const struct
|
|
||||||
TALER_Amount *recoup_loss_balance);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1418,13 +1369,12 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*select_historic_denom_revenue)(void *cls,
|
(*select_historic_denom_revenue)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_AUDITORDB_HistoricDenominationRevenueDataCallback
|
TALER_AUDITORDB_HistoricDenominationRevenueDataCallback cb,
|
||||||
cb,
|
void *cb_cls);
|
||||||
void *cb_cls);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1439,14 +1389,13 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_historic_reserve_revenue)(void *cls,
|
(*insert_historic_reserve_revenue)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
struct GNUNET_TIME_Absolute start_time,
|
struct GNUNET_TIME_Absolute start_time,
|
||||||
struct GNUNET_TIME_Absolute end_time,
|
struct GNUNET_TIME_Absolute end_time,
|
||||||
const struct
|
const struct TALER_Amount *reserve_profits);
|
||||||
TALER_Amount *reserve_profits);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1460,13 +1409,12 @@ struct TALER_AUDITORDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*select_historic_reserve_revenue)(void *cls,
|
(*select_historic_reserve_revenue)(
|
||||||
struct TALER_AUDITORDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_AUDITORDB_Session *session,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_AUDITORDB_HistoricReserveRevenueDataCallback
|
TALER_AUDITORDB_HistoricReserveRevenueDataCallback cb,
|
||||||
cb,
|
void *cb_cls);
|
||||||
void *cb_cls);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -138,14 +138,14 @@ typedef void
|
|||||||
* In this case, the callback is not called.
|
* In this case, the callback is not called.
|
||||||
*/
|
*/
|
||||||
struct TALER_BANK_AdminAddIncomingHandle *
|
struct TALER_BANK_AdminAddIncomingHandle *
|
||||||
TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
|
TALER_BANK_admin_add_incoming (
|
||||||
const struct TALER_BANK_AuthenticationData *auth,
|
struct GNUNET_CURL_Context *ctx,
|
||||||
const struct
|
const struct TALER_BANK_AuthenticationData *auth,
|
||||||
TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
const struct TALER_Amount *amount,
|
const struct TALER_Amount *amount,
|
||||||
const char *debit_account,
|
const char *debit_account,
|
||||||
TALER_BANK_AdminAddIncomingCallback res_cb,
|
TALER_BANK_AdminAddIncomingCallback res_cb,
|
||||||
void *res_cb_cls);
|
void *res_cb_cls);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -155,8 +155,8 @@ TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
|
|||||||
* @param aai the admin add incoming request handle
|
* @param aai the admin add incoming request handle
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_BANK_admin_add_incoming_cancel (struct
|
TALER_BANK_admin_add_incoming_cancel (
|
||||||
TALER_BANK_AdminAddIncomingHandle *aai);
|
struct TALER_BANK_AdminAddIncomingHandle *aai);
|
||||||
|
|
||||||
|
|
||||||
/* ********************* /transfer *********************** */
|
/* ********************* /transfer *********************** */
|
||||||
@ -174,13 +174,13 @@ TALER_BANK_admin_add_incoming_cancel (struct
|
|||||||
* @param[out] buf_size set to number of bytes in @a buf, 0 on error
|
* @param[out] buf_size set to number of bytes in @a buf, 0 on error
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_BANK_prepare_transfer (const char *destination_account_payto_uri,
|
TALER_BANK_prepare_transfer (
|
||||||
const struct TALER_Amount *amount,
|
const char *destination_account_payto_uri,
|
||||||
const char *exchange_base_url,
|
const struct TALER_Amount *amount,
|
||||||
const struct
|
const char *exchange_base_url,
|
||||||
TALER_WireTransferIdentifierRawP *wtid,
|
const struct TALER_WireTransferIdentifierRawP *wtid,
|
||||||
void **buf,
|
void **buf,
|
||||||
size_t *buf_size);
|
size_t *buf_size);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -305,13 +305,13 @@ struct TALER_BANK_CreditDetails
|
|||||||
* @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration
|
* @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_BANK_CreditHistoryCallback) (void *cls,
|
(*TALER_BANK_CreditHistoryCallback) (
|
||||||
unsigned int http_status,
|
void *cls,
|
||||||
enum TALER_ErrorCode ec,
|
unsigned int http_status,
|
||||||
uint64_t serial_id,
|
enum TALER_ErrorCode ec,
|
||||||
const struct
|
uint64_t serial_id,
|
||||||
TALER_BANK_CreditDetails *details,
|
const struct TALER_BANK_CreditDetails *details,
|
||||||
const json_t *json);
|
const json_t *json);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -415,13 +415,13 @@ struct TALER_BANK_DebitDetails
|
|||||||
* @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration
|
* @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_BANK_DebitHistoryCallback) (void *cls,
|
(*TALER_BANK_DebitHistoryCallback) (
|
||||||
unsigned int http_status,
|
void *cls,
|
||||||
enum TALER_ErrorCode ec,
|
unsigned int http_status,
|
||||||
uint64_t serial_id,
|
enum TALER_ErrorCode ec,
|
||||||
const struct
|
uint64_t serial_id,
|
||||||
TALER_BANK_DebitDetails *details,
|
const struct TALER_BANK_DebitDetails *details,
|
||||||
const json_t *json);
|
const json_t *json);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -633,11 +633,10 @@ TALER_planchet_to_coin (const struct TALER_DenominationPublicKey *dk,
|
|||||||
* @param[out] ts computed transfer secret
|
* @param[out] ts computed transfer secret
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_link_derive_transfer_secret (const struct
|
TALER_link_derive_transfer_secret (
|
||||||
TALER_CoinSpendPrivateKeyP *coin_priv,
|
const struct TALER_CoinSpendPrivateKeyP *coin_priv,
|
||||||
const struct
|
const struct TALER_TransferPrivateKeyP *trans_priv,
|
||||||
TALER_TransferPrivateKeyP *trans_priv,
|
struct TALER_TransferSecretP *ts);
|
||||||
struct TALER_TransferSecretP *ts);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -649,11 +648,10 @@ TALER_link_derive_transfer_secret (const struct
|
|||||||
* @param[out] transfer_secret set to the shared secret
|
* @param[out] transfer_secret set to the shared secret
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_link_reveal_transfer_secret (const struct
|
TALER_link_reveal_transfer_secret (
|
||||||
TALER_TransferPrivateKeyP *trans_priv,
|
const struct TALER_TransferPrivateKeyP *trans_priv,
|
||||||
const struct
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
struct TALER_TransferSecretP *transfer_secret);
|
||||||
struct TALER_TransferSecretP *transfer_secret);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -665,12 +663,10 @@ TALER_link_reveal_transfer_secret (const struct
|
|||||||
* @param[out] transfer_secret set to the shared secret
|
* @param[out] transfer_secret set to the shared secret
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_link_recover_transfer_secret (const struct
|
TALER_link_recover_transfer_secret (
|
||||||
TALER_TransferPublicKeyP *trans_pub,
|
const struct TALER_TransferPublicKeyP *trans_pub,
|
||||||
const struct
|
const struct TALER_CoinSpendPrivateKeyP *coin_priv,
|
||||||
TALER_CoinSpendPrivateKeyP *coin_priv,
|
struct TALER_TransferSecretP *transfer_secret);
|
||||||
struct TALER_TransferSecretP *
|
|
||||||
transfer_secret);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -758,11 +754,10 @@ TALER_exchange_wire_signature_hash (const char *payto_uri,
|
|||||||
* @return #GNUNET_OK if signature is valid
|
* @return #GNUNET_OK if signature is valid
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_exchange_wire_signature_check (const char *payto_uri,
|
TALER_exchange_wire_signature_check (
|
||||||
const struct
|
const char *payto_uri,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_MasterSignatureP *master_sig);
|
||||||
TALER_MasterSignatureP *master_sig);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -773,10 +768,10 @@ TALER_exchange_wire_signature_check (const char *payto_uri,
|
|||||||
* @param[out] master_sig where to write the signature
|
* @param[out] master_sig where to write the signature
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_exchange_wire_signature_make (const char *payto_uri,
|
TALER_exchange_wire_signature_make (
|
||||||
const struct
|
const char *payto_uri,
|
||||||
TALER_MasterPrivateKeyP *master_priv,
|
const struct TALER_MasterPrivateKeyP *master_priv,
|
||||||
struct TALER_MasterSignatureP *master_sig);
|
struct TALER_MasterSignatureP *master_sig);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -804,12 +799,11 @@ TALER_merchant_wire_signature_hash (const char *payto_uri,
|
|||||||
* @return #GNUNET_OK if signature is valid
|
* @return #GNUNET_OK if signature is valid
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_merchant_wire_signature_check (const char *payto_uri,
|
TALER_merchant_wire_signature_check (
|
||||||
const char *salt,
|
const char *payto_uri,
|
||||||
const struct
|
const char *salt,
|
||||||
TALER_MerchantPublicKeyP *merch_pub,
|
const struct TALER_MerchantPublicKeyP *merch_pub,
|
||||||
const struct
|
const struct TALER_MerchantSignatureP *merch_sig);
|
||||||
TALER_MerchantSignatureP *merch_sig);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -821,11 +815,11 @@ TALER_merchant_wire_signature_check (const char *payto_uri,
|
|||||||
* @param[out] merch_sig where to write the signature
|
* @param[out] merch_sig where to write the signature
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_merchant_wire_signature_make (const char *payto_uri,
|
TALER_merchant_wire_signature_make (
|
||||||
const char *salt,
|
const char *payto_uri,
|
||||||
const struct
|
const char *salt,
|
||||||
TALER_MerchantPrivateKeyP *merch_priv,
|
const struct TALER_MerchantPrivateKeyP *merch_priv,
|
||||||
struct TALER_MerchantSignatureP *merch_sig);
|
struct TALER_MerchantSignatureP *merch_sig);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -355,11 +355,10 @@ enum TALER_EXCHANGE_VersionCompatibility
|
|||||||
* @param compat protocol compatibility information
|
* @param compat protocol compatibility information
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGE_CertificationCallback) (void *cls,
|
(*TALER_EXCHANGE_CertificationCallback) (
|
||||||
const struct TALER_EXCHANGE_Keys *keys,
|
void *cls,
|
||||||
enum
|
const struct TALER_EXCHANGE_Keys *keys,
|
||||||
TALER_EXCHANGE_VersionCompatibility
|
enum TALER_EXCHANGE_VersionCompatibility compat);
|
||||||
compat);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -547,9 +546,9 @@ TALER_EXCHANGE_destroy_denomination_key (struct
|
|||||||
* @return details about the given denomination key
|
* @return details about the given denomination key
|
||||||
*/
|
*/
|
||||||
const struct TALER_EXCHANGE_DenomPublicKey *
|
const struct TALER_EXCHANGE_DenomPublicKey *
|
||||||
TALER_EXCHANGE_get_denomination_key_by_hash (const struct
|
TALER_EXCHANGE_get_denomination_key_by_hash (
|
||||||
TALER_EXCHANGE_Keys *keys,
|
const struct TALER_EXCHANGE_Keys *keys,
|
||||||
const struct GNUNET_HashCode *hc);
|
const struct GNUNET_HashCode *hc);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -561,11 +560,9 @@ TALER_EXCHANGE_get_denomination_key_by_hash (const struct
|
|||||||
* @return NULL on error (@a exchange_pub not known)
|
* @return NULL on error (@a exchange_pub not known)
|
||||||
*/
|
*/
|
||||||
const struct TALER_EXCHANGE_SigningPublicKey *
|
const struct TALER_EXCHANGE_SigningPublicKey *
|
||||||
TALER_EXCHANGE_get_signing_key_info (const struct
|
TALER_EXCHANGE_get_signing_key_info (
|
||||||
TALER_EXCHANGE_Keys *keys,
|
const struct TALER_EXCHANGE_Keys *keys,
|
||||||
const struct
|
const struct TALER_ExchangePublicKeyP *exchange_pub);
|
||||||
TALER_ExchangePublicKeyP *
|
|
||||||
exchange_pub);
|
|
||||||
|
|
||||||
|
|
||||||
/* ********************* /wire *********************** */
|
/* ********************* /wire *********************** */
|
||||||
@ -648,12 +645,12 @@ struct TALER_EXCHANGE_WireAccount
|
|||||||
* @param accounts list of wire accounts of the exchange, NULL on error
|
* @param accounts list of wire accounts of the exchange, NULL on error
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGE_WireCallback) (void *cls,
|
(*TALER_EXCHANGE_WireCallback) (
|
||||||
unsigned int http_status,
|
void *cls,
|
||||||
enum TALER_ErrorCode ec,
|
unsigned int http_status,
|
||||||
unsigned int accounts_len,
|
enum TALER_ErrorCode ec,
|
||||||
const struct
|
unsigned int accounts_len,
|
||||||
TALER_EXCHANGE_WireAccount *accounts);
|
const struct TALER_EXCHANGE_WireAccount *accounts);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -719,14 +716,13 @@ struct TALER_EXCHANGE_DepositHandle;
|
|||||||
* be forwarded to the customer)
|
* be forwarded to the customer)
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGE_DepositResultCallback) (void *cls,
|
(*TALER_EXCHANGE_DepositResultCallback) (
|
||||||
unsigned int http_status,
|
void *cls,
|
||||||
enum TALER_ErrorCode ec,
|
unsigned int http_status,
|
||||||
const struct
|
enum TALER_ErrorCode ec,
|
||||||
TALER_ExchangeSignatureP *exchange_sig,
|
const struct TALER_ExchangeSignatureP *exchange_sig,
|
||||||
const struct
|
const struct TALER_ExchangePublicKeyP *sign_key,
|
||||||
TALER_ExchangePublicKeyP *sign_key,
|
const json_t *obj);
|
||||||
const json_t *obj);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -820,12 +816,12 @@ struct TALER_EXCHANGE_RefundHandle;
|
|||||||
* be forwarded to the customer)
|
* be forwarded to the customer)
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGE_RefundCallback) (void *cls,
|
(*TALER_EXCHANGE_RefundCallback) (
|
||||||
unsigned int http_status,
|
void *cls,
|
||||||
enum TALER_ErrorCode ec,
|
unsigned int http_status,
|
||||||
const struct
|
enum TALER_ErrorCode ec,
|
||||||
TALER_ExchangePublicKeyP *sign_key,
|
const struct TALER_ExchangePublicKeyP *sign_key,
|
||||||
const json_t *obj);
|
const json_t *obj);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1103,16 +1099,15 @@ struct TALER_EXCHANGE_ReserveHistory
|
|||||||
* @param history detailed transaction history, NULL on error
|
* @param history detailed transaction history, NULL on error
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGE_ReservesGetCallback) (void *cls,
|
(*TALER_EXCHANGE_ReservesGetCallback) (
|
||||||
unsigned int http_status,
|
void *cls,
|
||||||
enum TALER_ErrorCode ec,
|
unsigned int http_status,
|
||||||
const json_t *json,
|
enum TALER_ErrorCode ec,
|
||||||
const struct
|
const json_t *json,
|
||||||
TALER_Amount *balance,
|
const struct
|
||||||
unsigned int history_length,
|
TALER_Amount *balance,
|
||||||
const struct
|
unsigned int history_length,
|
||||||
TALER_EXCHANGE_ReserveHistory *
|
const struct TALER_EXCHANGE_ReserveHistory *history);
|
||||||
history);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1132,11 +1127,11 @@ typedef void
|
|||||||
* signatures fail to verify). In this case, the callback is not called.
|
* signatures fail to verify). In this case, the callback is not called.
|
||||||
*/
|
*/
|
||||||
struct TALER_EXCHANGE_ReservesGetHandle *
|
struct TALER_EXCHANGE_ReservesGetHandle *
|
||||||
TALER_EXCHANGE_reserves_get (struct TALER_EXCHANGE_Handle *exchange,
|
TALER_EXCHANGE_reserves_get (
|
||||||
const struct
|
struct TALER_EXCHANGE_Handle *exchange,
|
||||||
TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
TALER_EXCHANGE_ReservesGetCallback cb,
|
TALER_EXCHANGE_ReservesGetCallback cb,
|
||||||
void *cb_cls);
|
void *cb_cls);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1146,8 +1141,8 @@ TALER_EXCHANGE_reserves_get (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
* @param rgh the reserve request handle
|
* @param rgh the reserve request handle
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_EXCHANGE_reserves_get_cancel (struct
|
TALER_EXCHANGE_reserves_get_cancel (
|
||||||
TALER_EXCHANGE_ReservesGetHandle *rgh);
|
struct TALER_EXCHANGE_ReservesGetHandle *rgh);
|
||||||
|
|
||||||
|
|
||||||
/* ********************* POST /reserves/$RESERVE_PUB/withdraw *********************** */
|
/* ********************* POST /reserves/$RESERVE_PUB/withdraw *********************** */
|
||||||
@ -1171,12 +1166,12 @@ struct TALER_EXCHANGE_WithdrawHandle;
|
|||||||
* @param full_response full response from the exchange (for logging, in case of errors)
|
* @param full_response full response from the exchange (for logging, in case of errors)
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGE_WithdrawCallback) (void *cls,
|
(*TALER_EXCHANGE_WithdrawCallback) (
|
||||||
unsigned int http_status,
|
void *cls,
|
||||||
enum TALER_ErrorCode ec,
|
unsigned int http_status,
|
||||||
const struct
|
enum TALER_ErrorCode ec,
|
||||||
TALER_DenominationSignature *sig,
|
const struct TALER_DenominationSignature *sig,
|
||||||
const json_t *full_response);
|
const json_t *full_response);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1201,14 +1196,13 @@ typedef void
|
|||||||
* In this case, the callback is not called.
|
* In this case, the callback is not called.
|
||||||
*/
|
*/
|
||||||
struct TALER_EXCHANGE_WithdrawHandle *
|
struct TALER_EXCHANGE_WithdrawHandle *
|
||||||
TALER_EXCHANGE_withdraw (struct TALER_EXCHANGE_Handle *exchange,
|
TALER_EXCHANGE_withdraw (
|
||||||
const struct TALER_EXCHANGE_DenomPublicKey *pk,
|
struct TALER_EXCHANGE_Handle *exchange,
|
||||||
const struct
|
const struct TALER_EXCHANGE_DenomPublicKey *pk,
|
||||||
TALER_ReservePrivateKeyP *reserve_priv,
|
const struct TALER_ReservePrivateKeyP *reserve_priv,
|
||||||
const struct TALER_PlanchetSecretsP *ps,
|
const struct TALER_PlanchetSecretsP *ps,
|
||||||
TALER_EXCHANGE_WithdrawCallback
|
TALER_EXCHANGE_WithdrawCallback res_cb,
|
||||||
res_cb,
|
void *res_cb_cls);
|
||||||
void *res_cb_cls);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1234,17 +1228,14 @@ TALER_EXCHANGE_withdraw (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
* In this case, the callback is not called.
|
* In this case, the callback is not called.
|
||||||
*/
|
*/
|
||||||
struct TALER_EXCHANGE_WithdrawHandle *
|
struct TALER_EXCHANGE_WithdrawHandle *
|
||||||
TALER_EXCHANGE_withdraw2 (struct TALER_EXCHANGE_Handle *exchange,
|
TALER_EXCHANGE_withdraw2 (
|
||||||
const struct
|
struct TALER_EXCHANGE_Handle *exchange,
|
||||||
TALER_EXCHANGE_DenomPublicKey *pk,
|
const struct TALER_EXCHANGE_DenomPublicKey *pk,
|
||||||
const struct
|
const struct TALER_ReserveSignatureP *reserve_sig,
|
||||||
TALER_ReserveSignatureP *reserve_sig,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
const struct
|
const struct TALER_PlanchetSecretsP *ps,
|
||||||
TALER_ReservePublicKeyP *reserve_pub,
|
TALER_EXCHANGE_WithdrawCallback res_cb,
|
||||||
const struct TALER_PlanchetSecretsP *ps,
|
void *res_cb_cls);
|
||||||
TALER_EXCHANGE_WithdrawCallback
|
|
||||||
res_cb,
|
|
||||||
void *res_cb_cls);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1299,17 +1290,14 @@ TALER_EXCHANGE_withdraw_cancel (struct TALER_EXCHANGE_WithdrawHandle *wh);
|
|||||||
* Non-null results should be freed using GNUNET_free().
|
* Non-null results should be freed using GNUNET_free().
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
TALER_EXCHANGE_refresh_prepare (const struct
|
TALER_EXCHANGE_refresh_prepare (
|
||||||
TALER_CoinSpendPrivateKeyP *melt_priv,
|
const struct TALER_CoinSpendPrivateKeyP *melt_priv,
|
||||||
const struct TALER_Amount *melt_amount,
|
const struct TALER_Amount *melt_amount,
|
||||||
const struct
|
const struct TALER_DenominationSignature *melt_sig,
|
||||||
TALER_DenominationSignature *melt_sig,
|
const struct TALER_EXCHANGE_DenomPublicKey *melt_pk,
|
||||||
const struct
|
unsigned int fresh_pks_len,
|
||||||
TALER_EXCHANGE_DenomPublicKey *melt_pk,
|
const struct TALER_EXCHANGE_DenomPublicKey *fresh_pks,
|
||||||
unsigned int fresh_pks_len,
|
size_t *res_size);
|
||||||
const struct
|
|
||||||
TALER_EXCHANGE_DenomPublicKey *fresh_pks,
|
|
||||||
size_t *res_size);
|
|
||||||
|
|
||||||
|
|
||||||
/* ********************* /coins/$COIN_PUB/melt ***************************** */
|
/* ********************* /coins/$COIN_PUB/melt ***************************** */
|
||||||
@ -1403,15 +1391,14 @@ TALER_EXCHANGE_melt_cancel (struct TALER_EXCHANGE_MeltHandle *mh);
|
|||||||
* @param full_response full response from the exchange (for logging, in case of errors)
|
* @param full_response full response from the exchange (for logging, in case of errors)
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGE_RefreshesRevealCallback)(void *cls,
|
(*TALER_EXCHANGE_RefreshesRevealCallback)(
|
||||||
unsigned int http_status,
|
void *cls,
|
||||||
enum TALER_ErrorCode ec,
|
unsigned int http_status,
|
||||||
unsigned int num_coins,
|
enum TALER_ErrorCode ec,
|
||||||
const struct
|
unsigned int num_coins,
|
||||||
TALER_PlanchetSecretsP *coin_privs,
|
const struct TALER_PlanchetSecretsP *coin_privs,
|
||||||
const struct
|
const struct TALER_DenominationSignature *sigs,
|
||||||
TALER_DenominationSignature *sigs,
|
const json_t *full_response);
|
||||||
const json_t *full_response);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1443,13 +1430,13 @@ struct TALER_EXCHANGE_RefreshesRevealHandle;
|
|||||||
* In this case, neither callback will be called.
|
* In this case, neither callback will be called.
|
||||||
*/
|
*/
|
||||||
struct TALER_EXCHANGE_RefreshesRevealHandle *
|
struct TALER_EXCHANGE_RefreshesRevealHandle *
|
||||||
TALER_EXCHANGE_refreshes_reveal (struct TALER_EXCHANGE_Handle *exchange,
|
TALER_EXCHANGE_refreshes_reveal (
|
||||||
size_t refresh_data_length,
|
struct TALER_EXCHANGE_Handle *exchange,
|
||||||
const char *refresh_data,
|
size_t refresh_data_length,
|
||||||
uint32_t noreveal_index,
|
const char *refresh_data,
|
||||||
TALER_EXCHANGE_RefreshesRevealCallback
|
uint32_t noreveal_index,
|
||||||
reveal_cb,
|
TALER_EXCHANGE_RefreshesRevealCallback reveal_cb,
|
||||||
void *reveal_cb_cls);
|
void *reveal_cb_cls);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1459,9 +1446,8 @@ TALER_EXCHANGE_refreshes_reveal (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
* @param rrh the refresh reval handle
|
* @param rrh the refresh reval handle
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_EXCHANGE_refreshes_reveal_cancel (struct
|
TALER_EXCHANGE_refreshes_reveal_cancel (
|
||||||
TALER_EXCHANGE_RefreshesRevealHandle *
|
struct TALER_EXCHANGE_RefreshesRevealHandle *rrh);
|
||||||
rrh);
|
|
||||||
|
|
||||||
|
|
||||||
/* ********************* /coins/$COIN_PUB/link ***************************** */
|
/* ********************* /coins/$COIN_PUB/link ***************************** */
|
||||||
@ -1490,17 +1476,15 @@ struct TALER_EXCHANGE_LinkHandle;
|
|||||||
* @param full_response full response from the exchange (for logging, in case of errors)
|
* @param full_response full response from the exchange (for logging, in case of errors)
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGE_LinkCallback) (void *cls,
|
(*TALER_EXCHANGE_LinkCallback) (
|
||||||
unsigned int http_status,
|
void *cls,
|
||||||
enum TALER_ErrorCode ec,
|
unsigned int http_status,
|
||||||
unsigned int num_coins,
|
enum TALER_ErrorCode ec,
|
||||||
const struct
|
unsigned int num_coins,
|
||||||
TALER_CoinSpendPrivateKeyP *coin_privs,
|
const struct TALER_CoinSpendPrivateKeyP *coin_privs,
|
||||||
const struct
|
const struct TALER_DenominationSignature *sigs,
|
||||||
TALER_DenominationSignature *sigs,
|
const struct TALER_DenominationPublicKey *pubs,
|
||||||
const struct
|
const json_t *full_response);
|
||||||
TALER_DenominationPublicKey *pubs,
|
|
||||||
const json_t *full_response);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1560,20 +1544,18 @@ struct TALER_EXCHANGE_TransfersGetHandle;
|
|||||||
* @param details array with details about the combined transactions
|
* @param details array with details about the combined transactions
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGE_TransfersGetCallback)(void *cls,
|
(*TALER_EXCHANGE_TransfersGetCallback)(
|
||||||
unsigned int http_status,
|
void *cls,
|
||||||
enum TALER_ErrorCode ec,
|
unsigned int http_status,
|
||||||
const struct
|
enum TALER_ErrorCode ec,
|
||||||
TALER_ExchangePublicKeyP *sign_key,
|
const struct TALER_ExchangePublicKeyP *sign_key,
|
||||||
const json_t *json,
|
const json_t *json,
|
||||||
const struct GNUNET_HashCode *h_wire,
|
const struct GNUNET_HashCode *h_wire,
|
||||||
struct GNUNET_TIME_Absolute
|
struct GNUNET_TIME_Absolute execution_time,
|
||||||
execution_time,
|
const struct TALER_Amount *total_amount,
|
||||||
const struct TALER_Amount *total_amount,
|
const struct TALER_Amount *wire_fee,
|
||||||
const struct TALER_Amount *wire_fee,
|
unsigned int details_length,
|
||||||
unsigned int details_length,
|
const struct TALER_TrackTransferDetails *details);
|
||||||
const struct
|
|
||||||
TALER_TrackTransferDetails *details);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1587,11 +1569,11 @@ typedef void
|
|||||||
* @return handle to cancel operation
|
* @return handle to cancel operation
|
||||||
*/
|
*/
|
||||||
struct TALER_EXCHANGE_TransfersGetHandle *
|
struct TALER_EXCHANGE_TransfersGetHandle *
|
||||||
TALER_EXCHANGE_transfers_get (struct TALER_EXCHANGE_Handle *exchange,
|
TALER_EXCHANGE_transfers_get (
|
||||||
const struct
|
struct TALER_EXCHANGE_Handle *exchange,
|
||||||
TALER_WireTransferIdentifierRawP *wtid,
|
const struct TALER_WireTransferIdentifierRawP *wtid,
|
||||||
TALER_EXCHANGE_TransfersGetCallback cb,
|
TALER_EXCHANGE_TransfersGetCallback cb,
|
||||||
void *cb_cls);
|
void *cb_cls);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1601,8 +1583,8 @@ TALER_EXCHANGE_transfers_get (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
* @param wdh the wire deposits request handle
|
* @param wdh the wire deposits request handle
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_EXCHANGE_transfers_get_cancel (struct
|
TALER_EXCHANGE_transfers_get_cancel (
|
||||||
TALER_EXCHANGE_TransfersGetHandle *wdh);
|
struct TALER_EXCHANGE_TransfersGetHandle *wdh);
|
||||||
|
|
||||||
|
|
||||||
/* ********************* GET /deposits/ *********************** */
|
/* ********************* GET /deposits/ *********************** */
|
||||||
@ -1629,19 +1611,16 @@ struct TALER_EXCHANGE_DepositGetHandle;
|
|||||||
* @param coin_contribution contribution to the total amount by this coin (can be NULL)
|
* @param coin_contribution contribution to the total amount by this coin (can be NULL)
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGE_DepositGetCallback)(void *cls,
|
(*TALER_EXCHANGE_DepositGetCallback)(
|
||||||
unsigned int http_status,
|
void *cls,
|
||||||
enum TALER_ErrorCode ec,
|
unsigned int http_status,
|
||||||
const struct
|
enum TALER_ErrorCode ec,
|
||||||
TALER_ExchangePublicKeyP *sign_key,
|
const struct TALER_ExchangePublicKeyP *sign_key,
|
||||||
const json_t *json,
|
const json_t *json,
|
||||||
const struct
|
const struct TALER_WireTransferIdentifierRawP *wtid,
|
||||||
TALER_WireTransferIdentifierRawP *
|
struct GNUNET_TIME_Absolute
|
||||||
wtid,
|
execution_time,
|
||||||
struct GNUNET_TIME_Absolute
|
const struct TALER_Amount *coin_contribution);
|
||||||
execution_time,
|
|
||||||
const struct
|
|
||||||
TALER_Amount *coin_contribution);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1659,16 +1638,14 @@ typedef void
|
|||||||
* @return handle to abort request
|
* @return handle to abort request
|
||||||
*/
|
*/
|
||||||
struct TALER_EXCHANGE_DepositGetHandle *
|
struct TALER_EXCHANGE_DepositGetHandle *
|
||||||
TALER_EXCHANGE_deposits_get (struct TALER_EXCHANGE_Handle *exchange,
|
TALER_EXCHANGE_deposits_get (
|
||||||
const struct
|
struct TALER_EXCHANGE_Handle *exchange,
|
||||||
TALER_MerchantPrivateKeyP *merchant_priv,
|
const struct TALER_MerchantPrivateKeyP *merchant_priv,
|
||||||
const struct GNUNET_HashCode *h_wire,
|
const struct GNUNET_HashCode *h_wire,
|
||||||
const struct
|
const struct GNUNET_HashCode *h_contract_terms,
|
||||||
GNUNET_HashCode *h_contract_terms,
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
const struct
|
TALER_EXCHANGE_DepositGetCallback cb,
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
void *cb_cls);
|
||||||
TALER_EXCHANGE_DepositGetCallback cb,
|
|
||||||
void *cb_cls);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1678,9 +1655,8 @@ TALER_EXCHANGE_deposits_get (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
* @param dwh the wire deposits request handle
|
* @param dwh the wire deposits request handle
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_EXCHANGE_deposits_get_cancel (struct
|
TALER_EXCHANGE_deposits_get_cancel (
|
||||||
TALER_EXCHANGE_DepositGetHandle *
|
struct TALER_EXCHANGE_DepositGetHandle *dwh);
|
||||||
dwh);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1695,13 +1671,12 @@ TALER_EXCHANGE_deposits_get_cancel (struct
|
|||||||
* @return #GNUNET_OK if @a history is valid, #GNUNET_SYSERR if not
|
* @return #GNUNET_OK if @a history is valid, #GNUNET_SYSERR if not
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGE_verify_coin_history (const struct
|
TALER_EXCHANGE_verify_coin_history (
|
||||||
TALER_EXCHANGE_DenomPublicKey *dk,
|
const struct TALER_EXCHANGE_DenomPublicKey *dk,
|
||||||
const char *currency,
|
const char *currency,
|
||||||
const struct
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
json_t *history,
|
||||||
json_t *history,
|
struct TALER_Amount *total);
|
||||||
struct TALER_Amount *total);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1721,15 +1696,14 @@ TALER_EXCHANGE_verify_coin_history (const struct
|
|||||||
* #GNUNET_SYSERR if there was a protocol violation in @a history
|
* #GNUNET_SYSERR if there was a protocol violation in @a history
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGE_parse_reserve_history (struct TALER_EXCHANGE_Handle *exchange,
|
TALER_EXCHANGE_parse_reserve_history (
|
||||||
const json_t *history,
|
struct TALER_EXCHANGE_Handle *exchange,
|
||||||
const struct
|
const json_t *history,
|
||||||
TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
const char *currency,
|
const char *currency,
|
||||||
struct TALER_Amount *balance,
|
struct TALER_Amount *balance,
|
||||||
unsigned int history_length,
|
unsigned int history_length,
|
||||||
struct TALER_EXCHANGE_ReserveHistory *
|
struct TALER_EXCHANGE_ReserveHistory *rhistory);
|
||||||
rhistory);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1739,9 +1713,9 @@ TALER_EXCHANGE_parse_reserve_history (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
* @param len number of entries in @a rhistory
|
* @param len number of entries in @a rhistory
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_EXCHANGE_free_reserve_history (struct
|
TALER_EXCHANGE_free_reserve_history (
|
||||||
TALER_EXCHANGE_ReserveHistory *rhistory,
|
struct TALER_EXCHANGE_ReserveHistory *rhistory,
|
||||||
unsigned int len);
|
unsigned int len);
|
||||||
|
|
||||||
|
|
||||||
/* ********************* /recoup *********************** */
|
/* ********************* /recoup *********************** */
|
||||||
@ -1773,16 +1747,15 @@ struct TALER_EXCHANGE_RecoupHandle;
|
|||||||
* @param full_response full response from the exchange (for logging, in case of errors)
|
* @param full_response full response from the exchange (for logging, in case of errors)
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGE_RecoupResultCallback) (void *cls,
|
(*TALER_EXCHANGE_RecoupResultCallback) (
|
||||||
unsigned int http_status,
|
void *cls,
|
||||||
enum TALER_ErrorCode ec,
|
unsigned int http_status,
|
||||||
const struct TALER_Amount *amount,
|
enum TALER_ErrorCode ec,
|
||||||
struct GNUNET_TIME_Absolute timestamp,
|
const struct TALER_Amount *amount,
|
||||||
const struct
|
struct GNUNET_TIME_Absolute timestamp,
|
||||||
TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
const struct
|
const struct TALER_CoinSpendPublicKeyP *old_coin_pub,
|
||||||
TALER_CoinSpendPublicKeyP *old_coin_pub,
|
const json_t *full_response);
|
||||||
const json_t *full_response);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,11 +50,10 @@
|
|||||||
* #GNUNET_SYSERR to abort iteration with error!
|
* #GNUNET_SYSERR to abort iteration with error!
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_EXCHANGEDB_SigningKeyIterator)(void *cls,
|
(*TALER_EXCHANGEDB_SigningKeyIterator)(
|
||||||
const char *filename,
|
void *cls,
|
||||||
const struct
|
const char *filename,
|
||||||
TALER_EXCHANGEDB_PrivateSigningKeyInformationP
|
const struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP *ski);
|
||||||
*ski);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -84,11 +83,10 @@ TALER_EXCHANGEDB_signing_keys_iterate (const char *exchange_base_dir,
|
|||||||
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
|
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGEDB_signing_key_write (const char *exchange_base_dir,
|
TALER_EXCHANGEDB_signing_key_write (
|
||||||
struct GNUNET_TIME_Absolute start,
|
const char *exchange_base_dir,
|
||||||
const struct
|
struct GNUNET_TIME_Absolute start,
|
||||||
TALER_EXCHANGEDB_PrivateSigningKeyInformationP
|
const struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP *ski);
|
||||||
*ski);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -102,11 +100,10 @@ TALER_EXCHANGEDB_signing_key_write (const char *exchange_base_dir,
|
|||||||
* #GNUNET_SYSERR to abort iteration with error!
|
* #GNUNET_SYSERR to abort iteration with error!
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_EXCHANGEDB_DenominationKeyIterator)(void *cls,
|
(*TALER_EXCHANGEDB_DenominationKeyIterator)(
|
||||||
const char *alias,
|
void *cls,
|
||||||
const struct
|
const char *alias,
|
||||||
TALER_EXCHANGEDB_DenominationKey
|
const struct TALER_EXCHANGEDB_DenominationKey *dki);
|
||||||
*dki);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -120,11 +117,10 @@ typedef int
|
|||||||
* #GNUNET_SYSERR to abort iteration with error!
|
* #GNUNET_SYSERR to abort iteration with error!
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_EXCHANGEDB_RevocationIterator)(void *cls,
|
(*TALER_EXCHANGEDB_RevocationIterator)(
|
||||||
const struct GNUNET_HashCode *denom_hash,
|
void *cls,
|
||||||
const struct
|
const struct GNUNET_HashCode *denom_hash,
|
||||||
TALER_MasterSignatureP *
|
const struct TALER_MasterSignatureP *revocation_master_sig);
|
||||||
revocation_master_sig);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -141,10 +137,10 @@ typedef int
|
|||||||
* as maybe none of the files were well-formed)
|
* as maybe none of the files were well-formed)
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGEDB_denomination_keys_iterate (const char *exchange_base_dir,
|
TALER_EXCHANGEDB_denomination_keys_iterate (
|
||||||
TALER_EXCHANGEDB_DenominationKeyIterator
|
const char *exchange_base_dir,
|
||||||
it,
|
TALER_EXCHANGEDB_DenominationKeyIterator it,
|
||||||
void *it_cls);
|
void *it_cls);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -160,11 +156,11 @@ TALER_EXCHANGEDB_denomination_keys_iterate (const char *exchange_base_dir,
|
|||||||
* as maybe none of the files were well-formed)
|
* as maybe none of the files were well-formed)
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGEDB_revocations_iterate (const char *revocation_dir,
|
TALER_EXCHANGEDB_revocations_iterate (
|
||||||
const struct
|
const char *revocation_dir,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
TALER_EXCHANGEDB_RevocationIterator it,
|
TALER_EXCHANGEDB_RevocationIterator it,
|
||||||
void *it_cls);
|
void *it_cls);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -177,11 +173,10 @@ TALER_EXCHANGEDB_revocations_iterate (const char *revocation_dir,
|
|||||||
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
|
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGEDB_denomination_key_revoke (const char *revocation_dir,
|
TALER_EXCHANGEDB_denomination_key_revoke (
|
||||||
const struct
|
const char *revocation_dir,
|
||||||
GNUNET_HashCode *denom_hash,
|
const struct GNUNET_HashCode *denom_hash,
|
||||||
const struct
|
const struct TALER_MasterPrivateKeyP *mpriv);
|
||||||
TALER_MasterPrivateKeyP *mpriv);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -192,10 +187,9 @@ TALER_EXCHANGEDB_denomination_key_revoke (const char *revocation_dir,
|
|||||||
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
|
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGEDB_denomination_key_write (const char *filename,
|
TALER_EXCHANGEDB_denomination_key_write (
|
||||||
const struct
|
const char *filename,
|
||||||
TALER_EXCHANGEDB_DenominationKey
|
const struct TALER_EXCHANGEDB_DenominationKey *dki);
|
||||||
*dki);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -206,10 +200,9 @@ TALER_EXCHANGEDB_denomination_key_write (const char *filename,
|
|||||||
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
|
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGEDB_denomination_key_read (const char *filename,
|
TALER_EXCHANGEDB_denomination_key_read (
|
||||||
struct
|
const char *filename,
|
||||||
TALER_EXCHANGEDB_DenominationKey
|
struct TALER_EXCHANGEDB_DenominationKey *dki);
|
||||||
*dki);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -227,14 +220,14 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename,
|
|||||||
* #GNUNET_SYSERR to abort iteration with error!
|
* #GNUNET_SYSERR to abort iteration with error!
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_EXCHANGEDB_AuditorIterator)(void *cls,
|
(*TALER_EXCHANGEDB_AuditorIterator)(
|
||||||
const struct TALER_AuditorPublicKeyP *apub,
|
void *cls,
|
||||||
const char *auditor_url,
|
const struct TALER_AuditorPublicKeyP *apub,
|
||||||
const struct TALER_MasterPublicKeyP *mpub,
|
const char *auditor_url,
|
||||||
unsigned int dki_len,
|
const struct TALER_MasterPublicKeyP *mpub,
|
||||||
const struct TALER_AuditorSignatureP *asigs,
|
unsigned int dki_len,
|
||||||
const struct
|
const struct TALER_AuditorSignatureP *asigs,
|
||||||
TALER_DenominationKeyValidityPS *dki);
|
const struct TALER_DenominationKeyValidityPS *dki);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -268,14 +261,14 @@ TALER_EXCHANGEDB_auditor_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg,
|
|||||||
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
|
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGEDB_auditor_write (const char *filename,
|
TALER_EXCHANGEDB_auditor_write (
|
||||||
const struct TALER_AuditorPublicKeyP *apub,
|
const char *filename,
|
||||||
const char *auditor_url,
|
const struct TALER_AuditorPublicKeyP *apub,
|
||||||
const struct TALER_AuditorSignatureP *asigs,
|
const char *auditor_url,
|
||||||
const struct TALER_MasterPublicKeyP *mpub,
|
const struct TALER_AuditorSignatureP *asigs,
|
||||||
unsigned int dki_len,
|
const struct TALER_MasterPublicKeyP *mpub,
|
||||||
const struct
|
uint32_t dki_len,
|
||||||
TALER_DenominationKeyValidityPS *dki);
|
const struct TALER_DenominationKeyValidityPS *dki);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -433,9 +426,9 @@ struct TALER_EXCHANGEDB_AccountInfo
|
|||||||
* @param ai account information
|
* @param ai account information
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGEDB_AccountCallback)(void *cls,
|
(*TALER_EXCHANGEDB_AccountCallback)(
|
||||||
const struct
|
void *cls,
|
||||||
TALER_EXCHANGEDB_AccountInfo *ai);
|
const struct TALER_EXCHANGEDB_AccountInfo *ai);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse the configuration to find account information.
|
* Parse the configuration to find account information.
|
||||||
@ -461,12 +454,10 @@ TALER_EXCHANGEDB_find_accounts (const struct GNUNET_CONFIGURATION_Handle *cfg,
|
|||||||
* @return #GNUNET_OK on success, #GNUNET_SYSERR on errors
|
* @return #GNUNET_OK on success, #GNUNET_SYSERR on errors
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_EXCHANGEDB_calculate_transaction_list_totals (struct
|
TALER_EXCHANGEDB_calculate_transaction_list_totals (
|
||||||
TALER_EXCHANGEDB_TransactionList
|
struct TALER_EXCHANGEDB_TransactionList *tl,
|
||||||
*tl,
|
const struct TALER_Amount *off,
|
||||||
const struct
|
struct TALER_Amount *ret);
|
||||||
TALER_Amount *off,
|
|
||||||
struct TALER_Amount *ret);
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -987,18 +987,16 @@ struct TALER_EXCHANGEDB_Session;
|
|||||||
* @return transaction status code, #GNUNET_DB_STATUS_SUCCESS_ONE_RESULT to continue to iterate
|
* @return transaction status code, #GNUNET_DB_STATUS_SUCCESS_ONE_RESULT to continue to iterate
|
||||||
*/
|
*/
|
||||||
typedef enum GNUNET_DB_QueryStatus
|
typedef enum GNUNET_DB_QueryStatus
|
||||||
(*TALER_EXCHANGEDB_DepositIterator)(void *cls,
|
(*TALER_EXCHANGEDB_DepositIterator)(
|
||||||
uint64_t rowid,
|
void *cls,
|
||||||
const struct
|
uint64_t rowid,
|
||||||
TALER_MerchantPublicKeyP *merchant_pub,
|
const struct TALER_MerchantPublicKeyP *merchant_pub,
|
||||||
const struct
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
const struct TALER_Amount *amount_with_fee,
|
||||||
const struct TALER_Amount *amount_with_fee,
|
const struct TALER_Amount *deposit_fee,
|
||||||
const struct TALER_Amount *deposit_fee,
|
const struct GNUNET_HashCode *h_contract_terms,
|
||||||
const struct
|
struct GNUNET_TIME_Absolute wire_deadline,
|
||||||
GNUNET_HashCode *h_contract_terms,
|
const json_t *receiver_wire_account);
|
||||||
struct GNUNET_TIME_Absolute wire_deadline,
|
|
||||||
const json_t *receiver_wire_account);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1041,24 +1039,20 @@ typedef void
|
|||||||
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_EXCHANGEDB_DepositCallback)(void *cls,
|
(*TALER_EXCHANGEDB_DepositCallback)(
|
||||||
uint64_t rowid,
|
void *cls,
|
||||||
struct GNUNET_TIME_Absolute timestamp,
|
uint64_t rowid,
|
||||||
const struct
|
struct GNUNET_TIME_Absolute timestamp,
|
||||||
TALER_MerchantPublicKeyP *merchant_pub,
|
const struct TALER_MerchantPublicKeyP *merchant_pub,
|
||||||
const struct
|
const struct TALER_DenominationPublicKey *denom_pub,
|
||||||
TALER_DenominationPublicKey *denom_pub,
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
const struct
|
const struct TALER_CoinSpendSignatureP *coin_sig,
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
const struct TALER_Amount *amount_with_fee,
|
||||||
const struct
|
const struct GNUNET_HashCode *h_contract_terms,
|
||||||
TALER_CoinSpendSignatureP *coin_sig,
|
struct GNUNET_TIME_Absolute refund_deadline,
|
||||||
const struct TALER_Amount *amount_with_fee,
|
struct GNUNET_TIME_Absolute wire_deadline,
|
||||||
const struct
|
const json_t *receiver_wire_account,
|
||||||
GNUNET_HashCode *h_contract_terms,
|
int done);
|
||||||
struct GNUNET_TIME_Absolute refund_deadline,
|
|
||||||
struct GNUNET_TIME_Absolute wire_deadline,
|
|
||||||
const json_t *receiver_wire_account,
|
|
||||||
int done);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1076,20 +1070,15 @@ typedef int
|
|||||||
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_EXCHANGEDB_RefreshesCallback)(void *cls,
|
(*TALER_EXCHANGEDB_RefreshesCallback)(
|
||||||
uint64_t rowid,
|
void *cls,
|
||||||
const struct
|
uint64_t rowid,
|
||||||
TALER_DenominationPublicKey *
|
const struct TALER_DenominationPublicKey *denom_pub,
|
||||||
denom_pub,
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
const struct
|
const struct TALER_CoinSpendSignatureP *coin_sig,
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
const struct TALER_Amount *amount_with_fee,
|
||||||
const struct
|
uint32_t noreveal_index,
|
||||||
TALER_CoinSpendSignatureP *coin_sig,
|
const struct TALER_RefreshCommitmentP *rc);
|
||||||
const struct
|
|
||||||
TALER_Amount *amount_with_fee,
|
|
||||||
uint32_t noreveal_index,
|
|
||||||
const struct
|
|
||||||
TALER_RefreshCommitmentP *rc);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1101,9 +1090,9 @@ typedef int
|
|||||||
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_EXCHANGEDB_RefundCoinCallback)(void *cls,
|
(*TALER_EXCHANGEDB_RefundCoinCallback)(
|
||||||
const struct
|
void *cls,
|
||||||
TALER_Amount *amount_with_fee);
|
const struct TALER_Amount *amount_with_fee);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1152,14 +1141,13 @@ struct TALER_EXCHANGEDB_RefreshRevealedCoin
|
|||||||
* @param tp transfer public key information
|
* @param tp transfer public key information
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGEDB_RefreshCallback)(void *cls,
|
(*TALER_EXCHANGEDB_RefreshCallback)(
|
||||||
uint32_t num_freshcoins,
|
void *cls,
|
||||||
const struct
|
uint32_t num_freshcoins,
|
||||||
TALER_EXCHANGEDB_RefreshRevealedCoin *rrcs,
|
const struct TALER_EXCHANGEDB_RefreshRevealedCoin *rrcs,
|
||||||
unsigned int num_tprivs,
|
unsigned int num_tprivs,
|
||||||
const struct
|
const struct TALER_TransferPrivateKeyP *tprivs,
|
||||||
TALER_TransferPrivateKeyP *tprivs,
|
const struct TALER_TransferPublicKeyP *tp);
|
||||||
const struct TALER_TransferPublicKeyP *tp);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1178,20 +1166,16 @@ typedef void
|
|||||||
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_EXCHANGEDB_RefundCallback)(void *cls,
|
(*TALER_EXCHANGEDB_RefundCallback)(
|
||||||
uint64_t rowid,
|
void *cls,
|
||||||
const struct
|
uint64_t rowid,
|
||||||
TALER_DenominationPublicKey *denom_pub,
|
const struct TALER_DenominationPublicKey *denom_pub,
|
||||||
const struct
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
const struct TALER_MerchantPublicKeyP *merchant_pub,
|
||||||
const struct
|
const struct TALER_MerchantSignatureP *merchant_sig,
|
||||||
TALER_MerchantPublicKeyP *merchant_pub,
|
const struct GNUNET_HashCode *h_contract_terms,
|
||||||
const struct
|
uint64_t rtransaction_id,
|
||||||
TALER_MerchantSignatureP *merchant_sig,
|
const struct TALER_Amount *amount_with_fee);
|
||||||
const struct
|
|
||||||
GNUNET_HashCode *h_contract_terms,
|
|
||||||
uint64_t rtransaction_id,
|
|
||||||
const struct TALER_Amount *amount_with_fee);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1207,15 +1191,14 @@ typedef int
|
|||||||
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_EXCHANGEDB_ReserveInCallback)(void *cls,
|
(*TALER_EXCHANGEDB_ReserveInCallback)(
|
||||||
uint64_t rowid,
|
void *cls,
|
||||||
const struct
|
uint64_t rowid,
|
||||||
TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
const struct TALER_Amount *credit,
|
const struct TALER_Amount *credit,
|
||||||
const char *sender_account_details,
|
const char *sender_account_details,
|
||||||
uint64_t wire_reference,
|
uint64_t wire_reference,
|
||||||
struct GNUNET_TIME_Absolute
|
struct GNUNET_TIME_Absolute execution_date);
|
||||||
execution_date);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1232,18 +1215,15 @@ typedef int
|
|||||||
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_EXCHANGEDB_WithdrawCallback)(void *cls,
|
(*TALER_EXCHANGEDB_WithdrawCallback)(
|
||||||
uint64_t rowid,
|
void *cls,
|
||||||
const struct GNUNET_HashCode *h_blind_ev,
|
uint64_t rowid,
|
||||||
const struct
|
const struct GNUNET_HashCode *h_blind_ev,
|
||||||
TALER_DenominationPublicKey *denom_pub,
|
const struct TALER_DenominationPublicKey *denom_pub,
|
||||||
const struct
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReserveSignatureP *reserve_sig,
|
||||||
const struct
|
struct GNUNET_TIME_Absolute execution_date,
|
||||||
TALER_ReserveSignatureP *reserve_sig,
|
const struct TALER_Amount *amount_with_fee);
|
||||||
struct GNUNET_TIME_Absolute execution_date,
|
|
||||||
const struct
|
|
||||||
TALER_Amount *amount_with_fee);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1255,10 +1235,10 @@ typedef int
|
|||||||
* @param ldl link data for @a transfer_pub
|
* @param ldl link data for @a transfer_pub
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGEDB_LinkCallback)(void *cls,
|
(*TALER_EXCHANGEDB_LinkCallback)(
|
||||||
const struct
|
void *cls,
|
||||||
TALER_TransferPublicKeyP *transfer_pub,
|
const struct TALER_TransferPublicKeyP *transfer_pub,
|
||||||
const struct TALER_EXCHANGEDB_LinkList *ldl);
|
const struct TALER_EXCHANGEDB_LinkList *ldl);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1276,17 +1256,12 @@ typedef void
|
|||||||
* when we expect it to be done (if @a wtid was NULL)
|
* when we expect it to be done (if @a wtid was NULL)
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGEDB_WireTransferByCoinCallback)(void *cls,
|
(*TALER_EXCHANGEDB_WireTransferByCoinCallback)(
|
||||||
const struct
|
void *cls,
|
||||||
TALER_WireTransferIdentifierRawP
|
const struct TALER_WireTransferIdentifierRawP *wtid,
|
||||||
*
|
const struct TALER_Amount *coin_contribution,
|
||||||
wtid,
|
const struct TALER_Amount *coin_fee,
|
||||||
const struct
|
struct GNUNET_TIME_Absolute execution_time);
|
||||||
TALER_Amount *coin_contribution,
|
|
||||||
const struct
|
|
||||||
TALER_Amount *coin_fee,
|
|
||||||
struct GNUNET_TIME_Absolute
|
|
||||||
execution_time);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1306,27 +1281,18 @@ typedef void
|
|||||||
* @param coin_fee applicable fee for this coin
|
* @param coin_fee applicable fee for this coin
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGEDB_AggregationDataCallback)(void *cls,
|
(*TALER_EXCHANGEDB_AggregationDataCallback)(
|
||||||
uint64_t rowid,
|
void *cls,
|
||||||
const struct
|
uint64_t rowid,
|
||||||
TALER_MerchantPublicKeyP *
|
const struct TALER_MerchantPublicKeyP *merchant_pub,
|
||||||
merchant_pub,
|
const struct GNUNET_HashCode *h_wire,
|
||||||
const struct
|
const json_t *account_details,
|
||||||
GNUNET_HashCode *h_wire,
|
struct GNUNET_TIME_Absolute exec_time,
|
||||||
const json_t *account_details,
|
const struct GNUNET_HashCode *h_contract_terms,
|
||||||
struct GNUNET_TIME_Absolute
|
const struct TALER_DenominationPublicKey *denom_pub,
|
||||||
exec_time,
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
const struct
|
const struct TALER_Amount *coin_value,
|
||||||
GNUNET_HashCode *h_contract_terms,
|
const struct TALER_Amount *coin_fee);
|
||||||
const struct
|
|
||||||
TALER_DenominationPublicKey *
|
|
||||||
denom_pub,
|
|
||||||
const struct
|
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
|
||||||
const struct
|
|
||||||
TALER_Amount *coin_value,
|
|
||||||
const struct
|
|
||||||
TALER_Amount *coin_fee);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1342,14 +1308,13 @@ typedef void
|
|||||||
* @return #GNUNET_OK to continue, #GNUNET_SYSERR to stop iteration
|
* @return #GNUNET_OK to continue, #GNUNET_SYSERR to stop iteration
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_EXCHANGEDB_WireTransferOutCallback)(void *cls,
|
(*TALER_EXCHANGEDB_WireTransferOutCallback)(
|
||||||
uint64_t rowid,
|
void *cls,
|
||||||
struct GNUNET_TIME_Absolute date,
|
uint64_t rowid,
|
||||||
const struct
|
struct GNUNET_TIME_Absolute date,
|
||||||
TALER_WireTransferIdentifierRawP *
|
const struct TALER_WireTransferIdentifierRawP *wtid,
|
||||||
wtid,
|
const json_t *wire,
|
||||||
const json_t *wire,
|
const struct TALER_Amount *amount);
|
||||||
const struct TALER_Amount *amount);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1386,19 +1351,16 @@ typedef int
|
|||||||
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_EXCHANGEDB_RecoupCallback)(void *cls,
|
(*TALER_EXCHANGEDB_RecoupCallback)(
|
||||||
uint64_t rowid,
|
void *cls,
|
||||||
struct GNUNET_TIME_Absolute timestamp,
|
uint64_t rowid,
|
||||||
const struct TALER_Amount *amount,
|
struct GNUNET_TIME_Absolute timestamp,
|
||||||
const struct
|
const struct TALER_Amount *amount,
|
||||||
TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
const struct TALER_CoinPublicInfo *coin,
|
const struct TALER_CoinPublicInfo *coin,
|
||||||
const struct
|
const struct TALER_DenominationPublicKey *denom_pub,
|
||||||
TALER_DenominationPublicKey *denom_pub,
|
const struct TALER_CoinSpendSignatureP *coin_sig,
|
||||||
const struct
|
const struct TALER_DenominationBlindingKeyP *coin_blind);
|
||||||
TALER_CoinSpendSignatureP *coin_sig,
|
|
||||||
const struct
|
|
||||||
TALER_DenominationBlindingKeyP *coin_blind);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1416,24 +1378,16 @@ typedef int
|
|||||||
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_EXCHANGEDB_RecoupRefreshCallback)(void *cls,
|
(*TALER_EXCHANGEDB_RecoupRefreshCallback)(
|
||||||
uint64_t rowid,
|
void *cls,
|
||||||
struct GNUNET_TIME_Absolute
|
uint64_t rowid,
|
||||||
timestamp,
|
struct GNUNET_TIME_Absolute timestamp,
|
||||||
const struct TALER_Amount *amount,
|
const struct TALER_Amount *amount,
|
||||||
const struct
|
const struct TALER_CoinSpendPublicKeyP *old_coin_pub,
|
||||||
TALER_CoinSpendPublicKeyP *
|
const struct TALER_CoinPublicInfo *coin,
|
||||||
old_coin_pub,
|
const struct TALER_DenominationPublicKey *denom_pub,
|
||||||
const struct
|
const struct TALER_CoinSpendSignatureP *coin_sig,
|
||||||
TALER_CoinPublicInfo *coin,
|
const struct TALER_DenominationBlindingKeyP *coin_blind);
|
||||||
const struct
|
|
||||||
TALER_DenominationPublicKey *
|
|
||||||
denom_pub,
|
|
||||||
const struct
|
|
||||||
TALER_CoinSpendSignatureP *coin_sig,
|
|
||||||
const struct
|
|
||||||
TALER_DenominationBlindingKeyP *
|
|
||||||
coin_blind);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1451,19 +1405,15 @@ typedef int
|
|||||||
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
|
||||||
*/
|
*/
|
||||||
typedef int
|
typedef int
|
||||||
(*TALER_EXCHANGEDB_ReserveClosedCallback)(void *cls,
|
(*TALER_EXCHANGEDB_ReserveClosedCallback)(
|
||||||
uint64_t rowid,
|
void *cls,
|
||||||
struct GNUNET_TIME_Absolute
|
uint64_t rowid,
|
||||||
execution_date,
|
struct GNUNET_TIME_Absolute execution_date,
|
||||||
const struct
|
const struct TALER_Amount *amount_with_fee,
|
||||||
TALER_Amount *amount_with_fee,
|
const struct TALER_Amount *closing_fee,
|
||||||
const struct
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
TALER_Amount *closing_fee,
|
const char *receiver_account,
|
||||||
const struct
|
const struct TALER_WireTransferIdentifierRawP *wtid);
|
||||||
TALER_ReservePublicKeyP *reserve_pub,
|
|
||||||
const char *receiver_account,
|
|
||||||
const struct
|
|
||||||
TALER_WireTransferIdentifierRawP *wtid);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1477,13 +1427,12 @@ typedef int
|
|||||||
* @return transaction status code to pass on
|
* @return transaction status code to pass on
|
||||||
*/
|
*/
|
||||||
typedef enum GNUNET_DB_QueryStatus
|
typedef enum GNUNET_DB_QueryStatus
|
||||||
(*TALER_EXCHANGEDB_ReserveExpiredCallback)(void *cls,
|
(*TALER_EXCHANGEDB_ReserveExpiredCallback)(
|
||||||
const struct
|
void *cls,
|
||||||
TALER_ReservePublicKeyP *reserve_pub,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
const struct TALER_Amount *left,
|
const struct TALER_Amount *left,
|
||||||
const char *account_details,
|
const char *account_details,
|
||||||
struct GNUNET_TIME_Absolute
|
struct GNUNET_TIME_Absolute expiration_date);
|
||||||
expiration_date);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1499,20 +1448,14 @@ typedef enum GNUNET_DB_QueryStatus
|
|||||||
* @param amount total amount to be paid back
|
* @param amount total amount to be paid back
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGEDB_RecoupJustificationCallback)(void *cls,
|
(*TALER_EXCHANGEDB_RecoupJustificationCallback)(
|
||||||
uint64_t rowid,
|
void *cls,
|
||||||
const struct
|
uint64_t rowid,
|
||||||
TALER_CoinPublicInfo *coin,
|
const struct TALER_CoinPublicInfo *coin,
|
||||||
const struct
|
const struct TALER_CoinSpendSignatureP *coin_sig,
|
||||||
TALER_CoinSpendSignatureP *
|
const struct TALER_DenominationBlindingKeyP *coin_blind,
|
||||||
coin_sig,
|
const struct GNUNET_HashCode *h_blinded_ev,
|
||||||
const struct
|
const struct TALER_Amount *amount);
|
||||||
TALER_DenominationBlindingKeyP
|
|
||||||
*coin_blind,
|
|
||||||
const struct
|
|
||||||
GNUNET_HashCode *h_blinded_ev,
|
|
||||||
const struct
|
|
||||||
TALER_Amount *amount);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1529,15 +1472,15 @@ typedef void
|
|||||||
* @param done did the exchange claim that it made a transfer?
|
* @param done did the exchange claim that it made a transfer?
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGEDB_WireMissingCallback)(void *cls,
|
(*TALER_EXCHANGEDB_WireMissingCallback)(
|
||||||
uint64_t rowid,
|
void *cls,
|
||||||
const struct
|
uint64_t rowid,
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
const struct TALER_Amount *amount,
|
const struct TALER_Amount *amount,
|
||||||
const json_t *wire,
|
const json_t *wire,
|
||||||
struct GNUNET_TIME_Absolute deadline,
|
struct GNUNET_TIME_Absolute deadline,
|
||||||
/* bool? */ int tiny,
|
/* bool? */ int tiny,
|
||||||
/* bool? */ int done);
|
/* bool? */ int done);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1548,12 +1491,11 @@ typedef void
|
|||||||
* @param issue detailed information about the denomination (value, expiration times, fees)
|
* @param issue detailed information about the denomination (value, expiration times, fees)
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(*TALER_EXCHANGEDB_DenominationCallback)(void *cls,
|
(*TALER_EXCHANGEDB_DenominationCallback)(
|
||||||
const struct
|
void *cls,
|
||||||
TALER_DenominationPublicKey *denom_pub,
|
const struct
|
||||||
const struct
|
TALER_DenominationPublicKey *denom_pub,
|
||||||
TALER_EXCHANGEDB_DenominationKeyInformationP
|
const struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue);
|
||||||
*issue);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1668,13 +1610,11 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return status of the query
|
* @return status of the query
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_denomination_info)(void *cls,
|
(*insert_denomination_info)(
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
TALER_DenominationPublicKey *denom_pub,
|
const struct TALER_DenominationPublicKey *denom_pub,
|
||||||
const struct
|
const struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue);
|
||||||
TALER_EXCHANGEDB_DenominationKeyInformationP *
|
|
||||||
issue);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1687,11 +1627,11 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*get_denomination_info)(void *cls,
|
(*get_denomination_info)(
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct GNUNET_HashCode *denom_pub_hash,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
struct TALER_EXCHANGEDB_DenominationKeyInformationP *
|
const struct GNUNET_HashCode *denom_pub_hash,
|
||||||
issue);
|
struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2058,14 +1998,14 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* transaction status code on error
|
* transaction status code on error
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*iterate_matching_deposits)(void *cls,
|
(*iterate_matching_deposits)(
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct GNUNET_HashCode *h_wire,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
const struct
|
const struct GNUNET_HashCode *h_wire,
|
||||||
TALER_MerchantPublicKeyP *merchant_pub,
|
const struct TALER_MerchantPublicKeyP *merchant_pub,
|
||||||
TALER_EXCHANGEDB_DepositIterator deposit_cb,
|
TALER_EXCHANGEDB_DepositIterator deposit_cb,
|
||||||
void *deposit_cb_cls,
|
void *deposit_cb_cls,
|
||||||
uint32_t limit);
|
uint32_t limit);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2135,15 +2075,15 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return query status for the transaction
|
* @return query status for the transaction
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_refresh_reveal)(void *cls,
|
(*insert_refresh_reveal)(
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct TALER_RefreshCommitmentP *rc,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint32_t num_rrcs,
|
const struct TALER_RefreshCommitmentP *rc,
|
||||||
const struct
|
uint32_t num_rrcs,
|
||||||
TALER_EXCHANGEDB_RefreshRevealedCoin *rrcs,
|
const struct TALER_EXCHANGEDB_RefreshRevealedCoin *rrcs,
|
||||||
unsigned int num_tprivs,
|
unsigned int num_tprivs,
|
||||||
const struct TALER_TransferPrivateKeyP *tprivs,
|
const struct TALER_TransferPrivateKeyP *tprivs,
|
||||||
const struct TALER_TransferPublicKeyP *tp);
|
const struct TALER_TransferPublicKeyP *tp);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2251,16 +2191,15 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*lookup_transfer_by_deposit)(void *cls,
|
(*lookup_transfer_by_deposit)(
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct GNUNET_HashCode *h_contract_terms,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
const struct GNUNET_HashCode *h_wire,
|
const struct GNUNET_HashCode *h_contract_terms,
|
||||||
const struct
|
const struct GNUNET_HashCode *h_wire,
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
const struct
|
const struct TALER_MerchantPublicKeyP *merchant_pub,
|
||||||
TALER_MerchantPublicKeyP *merchant_pub,
|
TALER_EXCHANGEDB_WireTransferByCoinCallback cb,
|
||||||
TALER_EXCHANGEDB_WireTransferByCoinCallback cb,
|
void *cb_cls);
|
||||||
void *cb_cls);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2273,11 +2212,11 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_aggregation_tracking)(void *cls,
|
(*insert_aggregation_tracking)(
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
TALER_WireTransferIdentifierRawP *wtid,
|
const struct TALER_WireTransferIdentifierRawP *wtid,
|
||||||
unsigned long long deposit_serial_id);
|
unsigned long long deposit_serial_id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2451,14 +2390,14 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*store_wire_transfer_out)(void *cls,
|
(*store_wire_transfer_out)(
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
struct GNUNET_TIME_Absolute date,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
const struct
|
struct GNUNET_TIME_Absolute date,
|
||||||
TALER_WireTransferIdentifierRawP *wtid,
|
const struct TALER_WireTransferIdentifierRawP *wtid,
|
||||||
const json_t *wire_account,
|
const json_t *wire_account,
|
||||||
const char *exchange_account_section,
|
const char *exchange_account_section,
|
||||||
const struct TALER_Amount *amount);
|
const struct TALER_Amount *amount);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2561,15 +2500,13 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*select_reserves_in_above_serial_id_by_account)(void *cls,
|
(*select_reserves_in_above_serial_id_by_account)(
|
||||||
struct
|
void *cls,
|
||||||
TALER_EXCHANGEDB_Session *
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
session,
|
const char *account_name,
|
||||||
const char *account_name,
|
uint64_t serial_id,
|
||||||
uint64_t serial_id,
|
TALER_EXCHANGEDB_ReserveInCallback cb,
|
||||||
TALER_EXCHANGEDB_ReserveInCallback
|
void *cb_cls);
|
||||||
cb,
|
|
||||||
void *cb_cls);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2585,12 +2522,12 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*select_withdrawals_above_serial_id)(void *cls,
|
(*select_withdrawals_above_serial_id)(
|
||||||
struct TALER_EXCHANGEDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_WithdrawCallback cb,
|
TALER_EXCHANGEDB_WithdrawCallback cb,
|
||||||
void *cb_cls);
|
void *cb_cls);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2624,14 +2561,13 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*select_wire_out_above_serial_id_by_account)(void *cls,
|
(*select_wire_out_above_serial_id_by_account)(
|
||||||
struct TALER_EXCHANGEDB_Session
|
void *cls,
|
||||||
*session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
const char *account_name,
|
const char *account_name,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_WireTransferOutCallback
|
TALER_EXCHANGEDB_WireTransferOutCallback cb,
|
||||||
cb,
|
void *cb_cls);
|
||||||
void *cb_cls);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2665,13 +2601,12 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*select_recoup_refresh_above_serial_id)(void *cls,
|
(*select_recoup_refresh_above_serial_id)(
|
||||||
struct TALER_EXCHANGEDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_RecoupRefreshCallback
|
TALER_EXCHANGEDB_RecoupRefreshCallback cb,
|
||||||
cb,
|
void *cb_cls);
|
||||||
void *cb_cls);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2686,13 +2621,12 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*select_reserve_closed_above_serial_id)(void *cls,
|
(*select_reserve_closed_above_serial_id)(
|
||||||
struct TALER_EXCHANGEDB_Session *
|
void *cls,
|
||||||
session,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
uint64_t serial_id,
|
uint64_t serial_id,
|
||||||
TALER_EXCHANGEDB_ReserveClosedCallback
|
TALER_EXCHANGEDB_ReserveClosedCallback cb,
|
||||||
cb,
|
void *cb_cls);
|
||||||
void *cb_cls);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2712,16 +2646,16 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction result status
|
* @return transaction result status
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_recoup_request)(void *cls,
|
(*insert_recoup_request)(
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct TALER_ReservePublicKeyP *reserve_pub,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
const struct TALER_CoinPublicInfo *coin,
|
const struct TALER_ReservePublicKeyP *reserve_pub,
|
||||||
const struct TALER_CoinSpendSignatureP *coin_sig,
|
const struct TALER_CoinPublicInfo *coin,
|
||||||
const struct
|
const struct TALER_CoinSpendSignatureP *coin_sig,
|
||||||
TALER_DenominationBlindingKeyP *coin_blind,
|
const struct TALER_DenominationBlindingKeyP *coin_blind,
|
||||||
const struct TALER_Amount *amount,
|
const struct TALER_Amount *amount,
|
||||||
const struct GNUNET_HashCode *h_blind_ev,
|
const struct GNUNET_HashCode *h_blind_ev,
|
||||||
struct GNUNET_TIME_Absolute timestamp);
|
struct GNUNET_TIME_Absolute timestamp);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2740,16 +2674,15 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction result status
|
* @return transaction result status
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_recoup_refresh_request)(void *cls,
|
(*insert_recoup_refresh_request)(
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct TALER_CoinPublicInfo *coin,
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
const struct
|
const struct TALER_CoinPublicInfo *coin,
|
||||||
TALER_CoinSpendSignatureP *coin_sig,
|
const struct TALER_CoinSpendSignatureP *coin_sig,
|
||||||
const struct
|
const struct TALER_DenominationBlindingKeyP *coin_blind,
|
||||||
TALER_DenominationBlindingKeyP *coin_blind,
|
const struct TALER_Amount *amount,
|
||||||
const struct TALER_Amount *amount,
|
const struct GNUNET_HashCode *h_blind_ev,
|
||||||
const struct GNUNET_HashCode *h_blind_ev,
|
struct GNUNET_TIME_Absolute timestamp);
|
||||||
struct GNUNET_TIME_Absolute timestamp);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2797,12 +2730,11 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*insert_denomination_revocation)(void *cls,
|
(*insert_denomination_revocation)(
|
||||||
struct TALER_EXCHANGEDB_Session *session,
|
void *cls,
|
||||||
const struct
|
struct TALER_EXCHANGEDB_Session *session,
|
||||||
GNUNET_HashCode *denom_pub_hash,
|
const struct GNUNET_HashCode *denom_pub_hash,
|
||||||
const struct
|
const struct TALER_MasterSignatureP *master_sig);
|
||||||
TALER_MasterSignatureP *master_sig);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -76,19 +76,19 @@ TALER_FAKEBANK_check_empty (struct TALER_FAKEBANK_Handle *h);
|
|||||||
* @param exchange_base_url exchange URL
|
* @param exchange_base_url exchange URL
|
||||||
* @param request_uid unique number to make the request unique, or NULL to create one
|
* @param request_uid unique number to make the request unique, or NULL to create one
|
||||||
* @param[out] ret_row_id pointer to store the row ID of this transaction
|
* @param[out] ret_row_id pointer to store the row ID of this transaction
|
||||||
* @return GNUNET_YES if the transfer was successful,
|
* @return #GNUNET_YES if the transfer was successful,
|
||||||
* GNUNET_SYSERR if the request_uid was reused for a different transfer
|
* #GNUNET_SYSERR if the request_uid was reused for a different transfer
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_FAKEBANK_make_transfer (struct TALER_FAKEBANK_Handle *h,
|
TALER_FAKEBANK_make_transfer (
|
||||||
const char *debit_account,
|
struct TALER_FAKEBANK_Handle *h,
|
||||||
const char *credit_account,
|
const char *debit_account,
|
||||||
const struct TALER_Amount *amount,
|
const char *credit_account,
|
||||||
const struct
|
const struct TALER_Amount *amount,
|
||||||
TALER_WireTransferIdentifierRawP *subject,
|
const struct TALER_WireTransferIdentifierRawP *subject,
|
||||||
const char *exchange_base_url,
|
const char *exchange_base_url,
|
||||||
const struct GNUNET_HashCode *request_uid,
|
const struct GNUNET_HashCode *request_uid,
|
||||||
uint64_t *ret_row_id);
|
uint64_t *ret_row_id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -102,12 +102,12 @@ TALER_FAKEBANK_make_transfer (struct TALER_FAKEBANK_Handle *h,
|
|||||||
* @return serial_id of the transfer
|
* @return serial_id of the transfer
|
||||||
*/
|
*/
|
||||||
uint64_t
|
uint64_t
|
||||||
TALER_FAKEBANK_make_admin_transfer (struct TALER_FAKEBANK_Handle *h,
|
TALER_FAKEBANK_make_admin_transfer (
|
||||||
const char *debit_account,
|
struct TALER_FAKEBANK_Handle *h,
|
||||||
const char *credit_account,
|
const char *debit_account,
|
||||||
const struct TALER_Amount *amount,
|
const char *credit_account,
|
||||||
const struct
|
const struct TALER_Amount *amount,
|
||||||
TALER_ReservePublicKeyP *reserve_pub);
|
const struct TALER_ReservePublicKeyP *reserve_pub);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -170,9 +170,9 @@ TALER_JSON_merchant_wire_signature_hash (const json_t *wire_s,
|
|||||||
* @return #GNUNET_OK if signature is valid
|
* @return #GNUNET_OK if signature is valid
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
|
TALER_JSON_exchange_wire_signature_check (
|
||||||
const struct
|
const json_t *wire_s,
|
||||||
TALER_MasterPublicKeyP *master_pub);
|
const struct TALER_MasterPublicKeyP *master_pub);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -183,9 +183,9 @@ TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
|
|||||||
* @return NULL if @a payto_uri is malformed
|
* @return NULL if @a payto_uri is malformed
|
||||||
*/
|
*/
|
||||||
json_t *
|
json_t *
|
||||||
TALER_JSON_exchange_wire_signature_make (const char *payto_uri,
|
TALER_JSON_exchange_wire_signature_make (
|
||||||
const struct
|
const char *payto_uri,
|
||||||
TALER_MasterPrivateKeyP *master_priv);
|
const struct TALER_MasterPrivateKeyP *master_priv);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -121,11 +121,10 @@ TALER_test_coin_valid (const struct TALER_CoinPublicInfo *coin_public_info,
|
|||||||
* @param[out] ts computed transfer secret
|
* @param[out] ts computed transfer secret
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_link_derive_transfer_secret (const struct
|
TALER_link_derive_transfer_secret (
|
||||||
TALER_CoinSpendPrivateKeyP *coin_priv,
|
const struct TALER_CoinSpendPrivateKeyP *coin_priv,
|
||||||
const struct
|
const struct TALER_TransferPrivateKeyP *trans_priv,
|
||||||
TALER_TransferPrivateKeyP *trans_priv,
|
struct TALER_TransferSecretP *ts)
|
||||||
struct TALER_TransferSecretP *ts)
|
|
||||||
{
|
{
|
||||||
struct TALER_CoinSpendPublicKeyP coin_pub;
|
struct TALER_CoinSpendPublicKeyP coin_pub;
|
||||||
|
|
||||||
@ -148,11 +147,10 @@ TALER_link_derive_transfer_secret (const struct
|
|||||||
* @param[out] transfer_secret set to the shared secret
|
* @param[out] transfer_secret set to the shared secret
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_link_reveal_transfer_secret (const struct
|
TALER_link_reveal_transfer_secret (
|
||||||
TALER_TransferPrivateKeyP *trans_priv,
|
const struct TALER_TransferPrivateKeyP *trans_priv,
|
||||||
const struct
|
const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
||||||
TALER_CoinSpendPublicKeyP *coin_pub,
|
struct TALER_TransferSecretP *transfer_secret)
|
||||||
struct TALER_TransferSecretP *transfer_secret)
|
|
||||||
{
|
{
|
||||||
GNUNET_assert (GNUNET_OK ==
|
GNUNET_assert (GNUNET_OK ==
|
||||||
GNUNET_CRYPTO_ecdh_eddsa (&trans_priv->ecdhe_priv,
|
GNUNET_CRYPTO_ecdh_eddsa (&trans_priv->ecdhe_priv,
|
||||||
@ -170,12 +168,10 @@ TALER_link_reveal_transfer_secret (const struct
|
|||||||
* @param[out] transfer_secret set to the shared secret
|
* @param[out] transfer_secret set to the shared secret
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_link_recover_transfer_secret (const struct
|
TALER_link_recover_transfer_secret (
|
||||||
TALER_TransferPublicKeyP *trans_pub,
|
const struct TALER_TransferPublicKeyP *trans_pub,
|
||||||
const struct
|
const struct TALER_CoinSpendPrivateKeyP *coin_priv,
|
||||||
TALER_CoinSpendPrivateKeyP *coin_priv,
|
struct TALER_TransferSecretP *transfer_secret)
|
||||||
struct TALER_TransferSecretP *
|
|
||||||
transfer_secret)
|
|
||||||
{
|
{
|
||||||
GNUNET_assert (GNUNET_OK ==
|
GNUNET_assert (GNUNET_OK ==
|
||||||
GNUNET_CRYPTO_eddsa_ecdh (&coin_priv->eddsa_priv,
|
GNUNET_CRYPTO_eddsa_ecdh (&coin_priv->eddsa_priv,
|
||||||
|
@ -54,11 +54,10 @@ TALER_exchange_wire_signature_hash (const char *payto_uri,
|
|||||||
* @return #GNUNET_OK if signature is valid
|
* @return #GNUNET_OK if signature is valid
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_exchange_wire_signature_check (const char *payto_uri,
|
TALER_exchange_wire_signature_check (
|
||||||
const struct
|
const char *payto_uri,
|
||||||
TALER_MasterPublicKeyP *master_pub,
|
const struct TALER_MasterPublicKeyP *master_pub,
|
||||||
const struct
|
const struct TALER_MasterSignatureP *master_sig)
|
||||||
TALER_MasterSignatureP *master_sig)
|
|
||||||
{
|
{
|
||||||
struct TALER_MasterWireDetailsPS wd;
|
struct TALER_MasterWireDetailsPS wd;
|
||||||
|
|
||||||
@ -81,10 +80,10 @@ TALER_exchange_wire_signature_check (const char *payto_uri,
|
|||||||
* @param[out] master_sig where to write the signature
|
* @param[out] master_sig where to write the signature
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_exchange_wire_signature_make (const char *payto_uri,
|
TALER_exchange_wire_signature_make (
|
||||||
const struct
|
const char *payto_uri,
|
||||||
TALER_MasterPrivateKeyP *master_priv,
|
const struct TALER_MasterPrivateKeyP *master_priv,
|
||||||
struct TALER_MasterSignatureP *master_sig)
|
struct TALER_MasterSignatureP *master_sig)
|
||||||
{
|
{
|
||||||
struct TALER_MasterWireDetailsPS wd;
|
struct TALER_MasterWireDetailsPS wd;
|
||||||
|
|
||||||
@ -144,12 +143,11 @@ TALER_merchant_wire_signature_hash (const char *payto_uri,
|
|||||||
* @return #GNUNET_OK if signature is valid
|
* @return #GNUNET_OK if signature is valid
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TALER_merchant_wire_signature_check (const char *payto_uri,
|
TALER_merchant_wire_signature_check (
|
||||||
const char *salt,
|
const char *payto_uri,
|
||||||
const struct
|
const char *salt,
|
||||||
TALER_MerchantPublicKeyP *merch_pub,
|
const struct TALER_MerchantPublicKeyP *merch_pub,
|
||||||
const struct
|
const struct TALER_MerchantSignatureP *merch_sig)
|
||||||
TALER_MerchantSignatureP *merch_sig)
|
|
||||||
{
|
{
|
||||||
struct TALER_MasterWireDetailsPS wd;
|
struct TALER_MasterWireDetailsPS wd;
|
||||||
|
|
||||||
@ -174,11 +172,11 @@ TALER_merchant_wire_signature_check (const char *payto_uri,
|
|||||||
* @param[out] merch_sig where to write the signature
|
* @param[out] merch_sig where to write the signature
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TALER_merchant_wire_signature_make (const char *payto_uri,
|
TALER_merchant_wire_signature_make (
|
||||||
const char *salt,
|
const char *payto_uri,
|
||||||
const struct
|
const char *salt,
|
||||||
TALER_MerchantPrivateKeyP *merch_priv,
|
const struct TALER_MerchantPrivateKeyP *merch_priv,
|
||||||
struct TALER_MerchantSignatureP *merch_sig)
|
struct TALER_MerchantSignatureP *merch_sig)
|
||||||
{
|
{
|
||||||
struct TALER_MasterWireDetailsPS wd;
|
struct TALER_MasterWireDetailsPS wd;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user