-add prototypes

This commit is contained in:
Christian Grothoff 2022-12-30 13:45:36 +01:00
parent 5169abcdcd
commit b7000379ed
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
12 changed files with 235 additions and 1 deletions

View File

@ -26,4 +26,30 @@
#include "taler_exchangedb_plugin.h"
/**
* Insert an AML decision. Inserts into AML history and insert or updates AML
* status.
*
* @param cls closure
* @param h_payto account for which the attribute data is stored
* @param new_threshold new monthly threshold that would trigger an AML check
* @param new_status AML decision status
* @param decision_time when was the decision made
* @param justification human-readable text justifying the decision
* @param decider_pub public key of the staff member
* @param decider_sig signature of the staff member
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
TEH_PG_insert_aml_decision (
void *cls,
const struct TALER_PaytoHashP *h_payto,
const struct TALER_Amount *new_threshold,
enum TALER_AmlDecisionState new_status,
struct GNUNET_TIME_Absolute decision_time,
const char *justification,
const struct TALER_AmlOfficerPublicKeyP *decider_pub,
const struct TALER_AmlOfficerSignatureP *decider_sig);
#endif

View File

@ -26,4 +26,26 @@
#include "taler_exchangedb_plugin.h"
/**
* Insert AML staff record.
*
* @param cls closure
* @param decider_pub public key of the staff member
* @param master_sig offline signature affirming the AML officer
* @param decider_name full name of the staff member
* @param is_active true to enable, false to set as inactive
* @param read_only true to set read-only access
* @param last_change when was the change made effective
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
TEH_PG_insert_aml_officer (
void *cls,
const struct TALER_AmlOfficerPublicKeyP *decider_pub,
const struct TALER_MasterSignatureP *master_sig,
const char *decider_name,
bool is_active,
bool read_only,
struct GNUNET_TIME_Absolute last_change);
#endif

View File

@ -26,4 +26,31 @@
#include "taler_exchangedb_plugin.h"
/**
* Store KYC attribute data.
*
* @param cls closure
* @param h_payto account for which the attribute data is stored
* @param kyc_prox key for similarity search
* @param provider_section provider that must be checked
* @param birthdate birthdate of user, in format YYYY-MM-DD; can be NULL;
* digits can be 0 if exact day, month or year are unknown
* @param collection_time when was the data collected
* @param expiration_time when does the data expire
* @param enc_attributes_size number of bytes in @a enc_attributes
* @param enc_attributes encrypted attribute data
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
TEH_PG_insert_kyc_attributes (
void *cls,
const struct TALER_PaytoHashP *h_payto,
const struct GNUNET_ShortHashCode *kyc_prox,
const char *provider_section,
const char *birthdate,
struct GNUNET_TIME_Timestamp collection_time,
struct GNUNET_TIME_Timestamp expiration_time,
size_t enc_attributes_size,
const void *enc_attributes);
#endif

View File

@ -26,4 +26,26 @@
#include "taler_exchangedb_plugin.h"
/**
* Fetch AML staff record.
*
* @param cls closure
* @param decider_pub public key of the staff member
* @param[out] master_sig offline signature affirming the AML officer
* @param[out] decider_name full name of the staff member
* @param[out] is_active true to enable, false to set as inactive
* @param[out] read_only true to set read-only access
* @param[out] last_change when was the change made effective
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
TEH_PG_lookup_aml_officer (
void *cls,
const struct TALER_AmlOfficerPublicKeyP *decider_pub,
struct TALER_MasterSignatureP *master_sig,
char **decider_name,
bool *is_active,
bool *read_only,
struct GNUNET_TIME_Absolute *last_change);
#endif

View File

@ -26,4 +26,21 @@
#include "taler_exchangedb_plugin.h"
/**
* Lookup AML decision history for a particular account.
*
* @param cls closure
* @param h_payto which account should we return the AML decision history for
* @param cb callback to invoke on each match
* @param cb_cls closure for @a cb
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
TEH_PG_select_aml_history (
void *cls,
const struct TALER_PaytoHashP *h_payto,
TALER_EXCHANGEDB_AmlHistoryCallback cb,
void *cb_cls);
#endif

View File

@ -26,4 +26,25 @@
#include "taler_exchangedb_plugin.h"
/**
* Lookup AML decisions that have a particular state.
*
* @param cls closure
* @param decision which decision states to filter by
* @param row_off offset to start from
* @param forward true to go forward in time, false to go backwards
* @param cb callback to invoke on each match
* @param cb_cls closure for @a cb
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
TEH_PG_select_aml_process (
void *cls,
enum TALER_AmlDecisionState decision,
uint64_t row_off,
bool forward,
TALER_EXCHANGEDB_AmlStatusCallback cb,
void *cb_cls);
#endif

View File

@ -26,4 +26,20 @@
#include "taler_exchangedb_plugin.h"
/**
* Lookup KYC attribute data for a specific account.
*
* @param cls closure
* @param h_payto account for which the attribute data is stored
* @param cb callback to invoke on each match
* @param cb_cls closure for @a cb
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
TEH_PG_select_kyc_attributes (
void *cls,
const struct TALER_PaytoHashP *h_payto,
TALER_EXCHANGEDB_AttributeCallback cb,
void *cb_cls);
#endif

View File

@ -26,4 +26,21 @@
#include "taler_exchangedb_plugin.h"
/**
* Lookup KYC attribute data for a specific account.
*
* @param cls closure
* @param h_payto account for which the attribute data is stored
* @param cb callback to invoke on each match
* @param cb_cls closure for @a cb
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
TEH_PG_select_kyc_attributes (
void *cls,
const struct TALER_PaytoHashP *h_payto,
TALER_EXCHANGEDB_AttributeCallback cb,
void *cb_cls);
#endif

View File

@ -26,4 +26,20 @@
#include "taler_exchangedb_plugin.h"
/**
* Trigger AML process, an account has crossed the threshold. Inserts or
* updates the AML status.
*
* @param cls closure
* @param h_payto account for which the attribute data is stored
* @param threshold_crossed existing threshold that was crossed
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
TEH_PG_trigger_aml_process (
void *cls,
const struct TALER_PaytoHashP *h_payto,
const struct TALER_Amount *threshold_crossed);
#endif

View File

@ -26,4 +26,26 @@
#include "taler_exchangedb_plugin.h"
/**
* Update AML staff record.
*
* @param cls closure
* @param decider_pub public key of the staff member
* @param master_sig offline signature affirming the AML officer
* @param decider_name full name of the staff member
* @param is_active true to enable, false to set as inactive
* @param read_only true to set read-only access
* @param last_change when was the change made effective
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
TEH_PG_update_aml_officer (
void *cls,
const struct TALER_AmlOfficerPublicKeyP *decider_pub,
const struct TALER_MasterSignatureP *master_sig,
const char *decider_name,
bool is_active,
bool read_only,
struct GNUNET_TIME_Absolute last_change);
#endif

View File

@ -26,4 +26,32 @@
#include "taler_exchangedb_plugin.h"
/**
* Update KYC attribute data.
*
* @param cls closure
* @param h_payto account for which the attribute data is stored
* @param kyc_prox key for similarity search
* @param provider_section provider that must be checked
* @param birthdate birthdate of user, in format YYYY-MM-DD; can be NULL;
* digits can be 0 if exact day, month or year are unknown
* @param collection_time when was the data collected
* @param expiration_time when does the data expire
* @param enc_attributes_size number of bytes in @a enc_attributes
* @param enc_attributes encrypted attribute data
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
TEH_PG_update_kyc_attributes (
void *cls,
const struct TALER_PaytoHashP *h_payto,
const struct GNUNET_ShortHashCode *kyc_prox,
const char *provider_section,
const char *birthdate,
struct GNUNET_TIME_Timestamp collection_time,
struct GNUNET_TIME_Timestamp expiration_time,
size_t enc_attributes_size,
const void *enc_attributes);
#endif

View File

@ -6690,7 +6690,7 @@ struct TALER_EXCHANGEDB_Plugin
* @return database transaction status
*/
enum GNUNET_DB_QueryStatus
(*select_aml_processes)(
(*select_aml_process)(
void *cls,
enum TALER_AmlDecisionState decision,
uint64_t row_off,