-
Notifications
You must be signed in to change notification settings - Fork 1
/
operation-create-AML-alert-request.x
100 lines (85 loc) · 3.35 KB
/
operation-create-AML-alert-request.x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
%#include "xdr/reviewable-request-AML-alert.h"
namespace stellar
{
/* CreateAMLAlertRequestOp
Creates AML alert request
Threshold: high
Result: CreateAMLAlertRequestResult
*/
//: CreateAMLAlertRequest operation creates a reviewable request
//: that will void the specified amount from target balance after the reviewer's approval
struct CreateAMLAlertRequestOp
{
//: Reference of AMLAlertRequest
string64 reference; // TODO longstring ?
//: Parameters of AMLAlertRequest
AMLAlertRequest amlAlertRequest;
//: (optional) Bit mask whose flags must be cleared in order for AMLAlertRequest to be approved, which will be used by key aml_alert_tasks:<asset_code>
//: instead of key-value
uint32* allTasks;
//: Reserved for future use
union switch (LedgerVersion v)
{
case EMPTY_VERSION:
void;
}
ext;
};
/******* CreateAMLAlertRequest Result ********/
//: Result codes for CreateAMLAlert operation
enum CreateAMLAlertRequestResultCode
{
// codes considered as "success" for the operation
//: Operation has been successfully performed
SUCCESS = 0,
//: DEPRECATED: Balance with provided balance ID does not exist
OLD_BALANCE_NOT_EXIST = 1, // balance doesn't exist
//: DEPRECATED: Creator details are not in a valid JSON format
OLD_INVALID_CREATOR_DETAILS = 2, //invalid reason for request
//: DEPRECATED: Specified amount is greater than the amount on the balance
OLD_UNDERFUNDED = 3, //when couldn't lock balance
//: DEPRECATED: AML Alert request with the same reference already exists
OLD_REFERENCE_DUPLICATION = 4, // reference already exists
//: DEPRECATED: Amount must be positive
OLD_INVALID_AMOUNT = 5, // amount must be positive
//: DEPRECATED: Amount precision and asset precision set in the system are mismatched
OLD_INCORRECT_PRECISION = 6,
//codes considered as "failure" for the operation
//: Update aml alert tasks are not set in the system, i.e. it's not allowed to perform aml alert
AML_ALERT_TASKS_NOT_FOUND = -1,
//: Balance with provided balance ID does not exist
BALANCE_NOT_EXIST = -2, // balance doesn't exist
//: Creator details are not in a valid JSON format
INVALID_CREATOR_DETAILS = -3, //invalid reason for request
//: Specified amount is greater than the amount on the balance
UNDERFUNDED = -4, //when couldn't lock balance
//: AML Alert request with the same reference already exists
REFERENCE_DUPLICATION = -5, // reference already exists
//: Amount must be positive
INVALID_AMOUNT = -6, // amount must be positive
//: Amount precision and asset precision set in the system are mismatched
INCORRECT_PRECISION = -7
};
//: Result of successful application of `CreateAMLAlertRequest` operation
struct CreateAMLAlertRequestSuccess {
//: ID of a newly created reviewable request
uint64 requestID;
//: Indicates whether or not the AMLAlert request was auto approved and fulfilled
bool fulfilled;
//: Reserved for future use
union switch (LedgerVersion v)
{
case EMPTY_VERSION:
void;
}
ext;
};
//: Result of `CreateAMLAlertRequest` operation application along with the result code
union CreateAMLAlertRequestResult switch (CreateAMLAlertRequestResultCode code)
{
case SUCCESS:
CreateAMLAlertRequestSuccess success;
default:
void;
};
}