xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
libxrpl
protocol
TxFormats.cpp
1
#include <xrpl/protocol/TxFormats.h>
2
3
#include <xrpl/protocol/Feature.h>
// IWYU pragma: keep
4
#include <xrpl/protocol/SField.h>
5
#include <xrpl/protocol/SOTemplate.h>
6
#include <xrpl/protocol/jss.h>
// IWYU pragma: keep
7
8
#include <
vector
>
9
10
namespace
xrpl
{
11
12
std::vector<SOElement>
const
&
13
TxFormats::getCommonFields
()
14
{
15
static
auto
const
kCommonFields =
std::vector<SOElement>
{
16
{sfTransactionType,
SoeRequired
},
17
{sfFlags,
SoeOptional
},
18
{sfSourceTag,
SoeOptional
},
19
{sfAccount,
SoeRequired
},
20
{sfSequence,
SoeRequired
},
21
{sfPreviousTxnID,
SoeOptional
},
// emulate027
22
{sfLastLedgerSequence,
SoeOptional
},
23
{sfAccountTxnID,
SoeOptional
},
24
{sfFee,
SoeRequired
},
25
{sfOperationLimit,
SoeOptional
},
26
{sfMemos,
SoeOptional
},
27
{sfSigningPubKey,
SoeRequired
},
28
{sfTicketSequence,
SoeOptional
},
29
{sfTxnSignature,
SoeOptional
},
30
{sfSigners,
SoeOptional
},
// submit_multisigned
31
{sfNetworkID,
SoeOptional
},
32
{sfDelegate,
SoeOptional
},
33
{sfSponsor,
SoeOptional
},
34
{sfSponsorFlags,
SoeOptional
},
35
{sfSponsorSignature,
SoeOptional
},
36
};
37
return
kCommonFields;
38
}
39
40
TxFormats::TxFormats
()
41
{
42
#pragma push_macro("UNWRAP")
43
#undef UNWRAP
44
#pragma push_macro("TRANSACTION")
45
#undef TRANSACTION
46
47
#define UNWRAP(...) __VA_ARGS__
48
#define TRANSACTION(tag, value, name, settings, fields) \
49
add(jss::name, tag, UNWRAP fields, getCommonFields());
50
51
#include <xrpl/protocol/detail/transactions.macro>
52
53
#undef TRANSACTION
54
#pragma pop_macro("TRANSACTION")
55
#undef UNWRAP
56
#pragma pop_macro("UNWRAP")
57
}
58
59
TxFormats
const
&
60
TxFormats::getInstance
()
61
{
62
static
TxFormats
const
kInstance;
63
return
kInstance;
64
}
65
66
}
// namespace xrpl
xrpl::TxFormats
Manages the list of known transaction formats.
Definition
TxFormats.h:83
xrpl::TxFormats::TxFormats
TxFormats()
Create the object.
Definition
TxFormats.cpp:40
xrpl::TxFormats::getCommonFields
static std::vector< SOElement > const & getCommonFields()
Definition
TxFormats.cpp:13
xrpl::TxFormats::getInstance
static TxFormats const & getInstance()
Definition
TxFormats.cpp:60
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::SoeOptional
@ SoeOptional
Definition
SOTemplate.h:23
xrpl::SoeRequired
@ SoeRequired
Definition
SOTemplate.h:22
vector
Generated by
1.17.0