gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: -add prototypes


From: gnunet
Subject: [taler-exchange] branch master updated: -add prototypes
Date: Fri, 30 Dec 2022 13:45:45 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new b7000379 -add prototypes
b7000379 is described below

commit b7000379ed2c7ca31aeb4561a0ffc1c4bf9405c7
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Dec 30 13:45:36 2022 +0100

    -add prototypes
---
 src/exchangedb/pg_insert_aml_decision.h           | 26 +++++++++++++++++++++
 src/exchangedb/pg_insert_aml_officer.h            | 22 ++++++++++++++++++
 src/exchangedb/pg_insert_kyc_attributes.h         | 27 ++++++++++++++++++++++
 src/exchangedb/pg_lookup_aml_officer.h            | 22 ++++++++++++++++++
 src/exchangedb/pg_select_aml_history.h            | 17 ++++++++++++++
 src/exchangedb/pg_select_aml_process.h            | 21 +++++++++++++++++
 src/exchangedb/pg_select_kyc_attributes.h         | 16 +++++++++++++
 src/exchangedb/pg_select_similar_kyc_attributes.h | 17 ++++++++++++++
 src/exchangedb/pg_trigger_aml_process.h           | 16 +++++++++++++
 src/exchangedb/pg_update_aml_officer.h            | 22 ++++++++++++++++++
 src/exchangedb/pg_update_kyc_attributes.h         | 28 +++++++++++++++++++++++
 src/include/taler_exchangedb_plugin.h             |  2 +-
 12 files changed, 235 insertions(+), 1 deletion(-)

diff --git a/src/exchangedb/pg_insert_aml_decision.h 
b/src/exchangedb/pg_insert_aml_decision.h
index e5123a7a..205c1c74 100644
--- a/src/exchangedb/pg_insert_aml_decision.h
+++ b/src/exchangedb/pg_insert_aml_decision.h
@@ -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
diff --git a/src/exchangedb/pg_insert_aml_officer.h 
b/src/exchangedb/pg_insert_aml_officer.h
index 62a442ac..be034d9f 100644
--- a/src/exchangedb/pg_insert_aml_officer.h
+++ b/src/exchangedb/pg_insert_aml_officer.h
@@ -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
diff --git a/src/exchangedb/pg_insert_kyc_attributes.h 
b/src/exchangedb/pg_insert_kyc_attributes.h
index 343fe22d..8ee307d7 100644
--- a/src/exchangedb/pg_insert_kyc_attributes.h
+++ b/src/exchangedb/pg_insert_kyc_attributes.h
@@ -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
diff --git a/src/exchangedb/pg_lookup_aml_officer.h 
b/src/exchangedb/pg_lookup_aml_officer.h
index 5819ef4b..161d2e7e 100644
--- a/src/exchangedb/pg_lookup_aml_officer.h
+++ b/src/exchangedb/pg_lookup_aml_officer.h
@@ -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
diff --git a/src/exchangedb/pg_select_aml_history.h 
b/src/exchangedb/pg_select_aml_history.h
index db117bb0..78569947 100644
--- a/src/exchangedb/pg_select_aml_history.h
+++ b/src/exchangedb/pg_select_aml_history.h
@@ -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
diff --git a/src/exchangedb/pg_select_aml_process.h 
b/src/exchangedb/pg_select_aml_process.h
index c8655c24..019f58b2 100644
--- a/src/exchangedb/pg_select_aml_process.h
+++ b/src/exchangedb/pg_select_aml_process.h
@@ -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
diff --git a/src/exchangedb/pg_select_kyc_attributes.h 
b/src/exchangedb/pg_select_kyc_attributes.h
index 09f297bf..7458aefe 100644
--- a/src/exchangedb/pg_select_kyc_attributes.h
+++ b/src/exchangedb/pg_select_kyc_attributes.h
@@ -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
diff --git a/src/exchangedb/pg_select_similar_kyc_attributes.h 
b/src/exchangedb/pg_select_similar_kyc_attributes.h
index a264da38..b3243371 100644
--- a/src/exchangedb/pg_select_similar_kyc_attributes.h
+++ b/src/exchangedb/pg_select_similar_kyc_attributes.h
@@ -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
diff --git a/src/exchangedb/pg_trigger_aml_process.h 
b/src/exchangedb/pg_trigger_aml_process.h
index 45bc0496..2283571a 100644
--- a/src/exchangedb/pg_trigger_aml_process.h
+++ b/src/exchangedb/pg_trigger_aml_process.h
@@ -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
diff --git a/src/exchangedb/pg_update_aml_officer.h 
b/src/exchangedb/pg_update_aml_officer.h
index 9e53dd50..8e359239 100644
--- a/src/exchangedb/pg_update_aml_officer.h
+++ b/src/exchangedb/pg_update_aml_officer.h
@@ -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
diff --git a/src/exchangedb/pg_update_kyc_attributes.h 
b/src/exchangedb/pg_update_kyc_attributes.h
index 252d2768..5d17eb7f 100644
--- a/src/exchangedb/pg_update_kyc_attributes.h
+++ b/src/exchangedb/pg_update_kyc_attributes.h
@@ -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
diff --git a/src/include/taler_exchangedb_plugin.h 
b/src/include/taler_exchangedb_plugin.h
index bba59355..92907c5f 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -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,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]