summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-10-02 23:57:09 +0200
committerChristian Grothoff <christian@grothoff.org>2022-10-02 23:57:09 +0200
commit3bca75d6cfb4c28e9800198d606ae030930e126b (patch)
treec513269ca21a09d3b95c03ea5c24abed939b4d1c /src/include
parent1ce70b1dabb390d04b3b886816e49237288b9b31 (diff)
downloadexchange-3bca75d6cfb4c28e9800198d606ae030930e126b.tar.gz
exchange-3bca75d6cfb4c28e9800198d606ae030930e126b.tar.bz2
exchange-3bca75d6cfb4c28e9800198d606ae030930e126b.zip
complete taler-exchange-httpd_reserves_get_attest.c logic (first pass, still without DB logic or tests)
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_exchangedb_plugin.h37
-rw-r--r--src/include/taler_kyclogic_lib.h21
2 files changed, 58 insertions, 0 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 609265f1e..e5cc8dfa7 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -878,6 +878,25 @@ typedef void
/**
+ * Function called on all legitimization operations
+ * we have performed for the given account so far
+ * (and that have not yet expired).
+ *
+ * @param cls closure
+ * @param kyc_provider_section_name configuration section
+ * of the respective KYC process
+ * @param provider_user_id UID at a provider (can be NULL)
+ * @param legi_id legitimization process ID (can be NULL)
+ */
+typedef void
+(*TALER_EXCHANGEDB_LegitimizationProcessCallback)(
+ void *cls,
+ const char *kyc_provider_section_name,
+ const char *provider_user_id,
+ const char *legi_id);
+
+
+/**
* Function called with information about the exchange's auditors.
*
* @param cls closure with a `struct TEH_KeyStateHandle *`
@@ -5820,6 +5839,24 @@ struct TALER_EXCHANGEDB_Plugin
/**
+ * Call us on KYC legitimization processes satisfied and not expired for the
+ * given account.
+ *
+ * @param cls the @e cls of this struct with the plugin-specific state
+ * @param h_payto account identifier
+ * @param lpc function to call for each satisfied KYC legitimization process
+ * @param lpc_cls closure for @a lpc
+ * @return transaction status code
+ */
+ enum GNUNET_DB_QueryStatus
+ (*iterate_kyc_reference)(
+ void *cls,
+ const struct TALER_PaytoHashP *h_payto,
+ TALER_EXCHANGEDB_LegitimizationProcessCallback lpc,
+ void *lpc_cls);
+
+
+ /**
* Call @a kac on withdrawn amounts after @a time_limit which are relevant
* for a KYC trigger for a the (debited) account identified by @a h_payto.
*
diff --git a/src/include/taler_kyclogic_lib.h b/src/include/taler_kyclogic_lib.h
index 2ff652f9e..7f4bf5b57 100644
--- a/src/include/taler_kyclogic_lib.h
+++ b/src/include/taler_kyclogic_lib.h
@@ -307,6 +307,27 @@ TALER_KYCLOGIC_requirements_to_logic (const char *requirements,
/**
+ * Obtain attributes we collected about a user from a
+ * provider.
+ *
+ * @param provider_section configuration section of a
+ * provider that triggered KYC process for a user
+ * @param provider_user user ID of the user at the provider
+ * @param legitimization_id legitimizatin ID of a process
+ * of that user at the provider
+ * @param[out] attr_expiration set to when the @a attrs expire
+ * @param[out] attrs attributes we have about the user
+ * @return error code, #TALER_EC_NONE on success
+ */
+enum TALER_ErrorCode
+TALER_KYCLOGIC_user_to_attributes (const char *provider_section,
+ const char *provider_user_id,
+ const char *legitimization_id,
+ struct GNUNET_TIME_Timestamp *attr_expiration,
+ json_t **attrs);
+
+
+/**
* Obtain the provider logic for a given @a name.
*
* @param name name of the logic or provider section