-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoperation-create-deferred-payment-creation-request.x
72 lines (62 loc) · 2.06 KB
/
operation-create-deferred-payment-creation-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
%#include "xdr/ledger-entries.h"
%#include "xdr/reviewable-request-create-deferred-payment.h"
namespace stellar
{
//: CreateDeferredPaymentCreationRequestOp is used to create `CREATE_DEFERRED_PAYMENT` request
struct CreateDeferredPaymentCreationRequestOp
{
uint64 requestID;
//: Body of request which will be created
CreateDeferredPaymentRequest request;
//: (optional) Bit mask whose flags must be cleared in order for `CREATE_ATOMIC_SWAP_BID` request to be approved,
//: which will be used instead of key-value by `create_deferred_payment_creation_request_tasks` key
uint32* allTasks;
//: reserved for the future use
union switch (LedgerVersion v)
{
case EMPTY_VERSION:
void;
}
ext;
};
//: Result codes of CreateAtomicSwapBidRequestOp
enum CreateDeferredPaymentCreationRequestResultCode
{
//: `CREATE_DEFERRED_PAYMENT` request has either been successfully created
//: or auto approved
SUCCESS = 0,
SOURCE_BALANCE_NOT_FOUND = -1,
DESTINATION_ACCOUNT_NOT_FOUND = -2,
INCORRECT_PRECISION = -3,
UNDERFUNDED = -4,
TASKS_NOT_FOUND = -5,
INVALID_CREATOR_DETAILS = -6,
INVALID_AMOUNT = -7,
REQUEST_NOT_FOUND = -8
};
//: Success result of CreateASwapAskCreationRequestOp application
struct CreateDeferredPaymentCreationRequestSuccess
{
//: id of created request
uint64 requestID;
//: Indicates whether or not the `CREATE_ATOMIC_SWAP_ASK` request was auto approved and fulfilled
bool fulfilled;
//: ID of a newly created ask (if the ask creation request has been auto approved)
uint64 deferredPaymentID;
//: reserved for the future use
union switch (LedgerVersion v)
{
case EMPTY_VERSION:
void;
} ext;
};
//: Result of CreateDeferredPaymentCreationRequestOp application
union CreateDeferredPaymentCreationRequestResult switch (CreateDeferredPaymentCreationRequestResultCode code)
{
case SUCCESS:
//: is used to pass useful fields after successful operation applying
CreateDeferredPaymentCreationRequestSuccess success;
default:
void;
};
}