commit 42544aeb8a4c6142556b52d40d5b91daebeb3138
parent 04672b31521a1fc89cf75d34f1c248ca7ec1c84b
Author: Christian Grothoff <christian@grothoff.org>
Date: Tue, 19 Nov 2024 19:34:59 +0100
expose current and default rules to AML programs, plus allow AML programs to specify which inputs they actually need
Diffstat:
1 file changed, 38 insertions(+), 4 deletions(-)
diff --git a/taler-kyc-manual.rst b/taler-kyc-manual.rst
@@ -633,7 +633,7 @@ Implementing your own AML programs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When implementing an AML program, developers must
-ensure to provide three main execution paths:
+ensure to provide four main execution paths:
* Generate a list of *required* context field names
for the helper (introspection!) when given the "-r"
@@ -641,6 +641,19 @@ ensure to provide three main execution paths:
syntax as the REQUIRES clause of ``[kyc-check-]``
configuration sections, except that new lines
MUST be used to separate fields instead of ";".
+* Generate a list of *required* inputs fields
+ for the helper (introspection!) when given the "-i"
+ command-line switch. The input fields are named
+ after the respective fields of the `AmlProgramInput`,
+ thus "attributes", "aml_history", "kyc_history",
+ "default_rules" and "current_rules" are valid strings
+ to return. Additinally, for the histories, it is
+ possible to specify "*_history[$NUMBER]" where
+ "$NUMBER" is the number of entries to return, with
+ positive numbers counting from the start of the
+ history and negative numbers from the end of the
+ history. Thus, "aml_history[-1]" will cause only
+ the last AML history entry to be included.
* Generate a list of *required* attribute names
for the helper (introspection!) when given the "-a"
command-line switch. The output should use the same
@@ -690,15 +703,36 @@ administrator.
// keys will match the HTML FORM field names and
// the values will use the `KycStructuredFormData`
// encoding.
- attributes: Object;
+ // Attributes are only provided if the AML program
+ // specifies "attributes" for its input requirements.
+ attributes?: Object;
// JSON array with the results of historic
// AML desisions about the account.
- aml_history: AmlHistoryEntry[];
+ //
+ // AML history is only provided if the AML program
+ // specifies "aml_history" for its input requirements.
+ aml_history?: AmlHistoryEntry[];
// JSON array with the results of historic
// KYC data about the account.
- kyc_history: KycHistoryEntry[];
+ //
+ // KYC history is only provided if the AML program
+ // specifies "kyc_history" for its input requirements.
+ kyc_history?: KycHistoryEntry[];
+
+ // Default KYC rules of the exchange (exposed and not exposed).
+ //
+ // Default KYC rules are only provided if the AML program
+ // specifies "default_rules" for its input requirements.
+ default_rules?: LegitimizationRuleSet;
+
+ // Current KYC rules the exchange applies for this user.
+ // (exposed and not exposed).
+ //
+ // Current KYC rules are only provided if the AML program
+ // specifies "current_rules" for its input requirements.
+ current_rules?: LegitimizationRuleSet;
}