rippled
Loading...
Searching...
No Matches
TransactionSign.h
1#ifndef XRPL_RPC_TRANSACTIONSIGN_H_INCLUDED
2#define XRPL_RPC_TRANSACTIONSIGN_H_INCLUDED
3
4#include <xrpld/app/misc/LoadFeeTrack.h>
5#include <xrpld/app/misc/NetworkOPs.h>
6#include <xrpld/rpc/Role.h>
7#include <xrpld/rpc/detail/Tuning.h>
8
9namespace ripple {
10
11// Forward declarations
12class Application;
13class LoadFeeTrack;
14class Transaction;
15class TxQ;
16
17namespace RPC {
18
21 Role const role,
22 Config const& config,
23 LoadFeeTrack const& feeTrack,
24 TxQ const& txQ,
25 Application const& app,
26 Json::Value const& tx,
29
59 Json::Value& request,
60 Role const role,
61 bool doAutoFill,
62 Config const& config,
63 LoadFeeTrack const& feeTrack,
64 TxQ const& txQ,
65 Application const& app);
66
67// Return a std::function<> that calls NetworkOPs::processTransaction.
70 bool bUnlimited,
71 bool bLocal,
72 NetworkOPs::FailHard failType)>;
73
76{
77 return [&netOPs](
79 bool bUnlimited,
80 bool bLocal,
81 NetworkOPs::FailHard failType) {
82 netOPs.processTransaction(transaction, bUnlimited, bLocal, failType);
83 };
84}
85
89 Json::Value params, // Passed by value so it can be modified locally.
90 unsigned apiVersion,
91 NetworkOPs::FailHard failType,
92 Role role,
93 std::chrono::seconds validatedLedgerAge,
94 Application& app);
95
99 Json::Value params, // Passed by value so it can be modified locally.
100 unsigned apiVersion,
101 NetworkOPs::FailHard failType,
102 Role role,
103 std::chrono::seconds validatedLedgerAge,
104 Application& app,
105 ProcessTransactionFn const& processTransaction);
106
110 Json::Value params, // Passed by value so it can be modified locally.
111 unsigned apiVersion,
112 NetworkOPs::FailHard failType,
113 Role role,
114 std::chrono::seconds validatedLedgerAge,
115 Application& app);
116
120 Json::Value params, // Passed by value so it can be modified locally.
121 unsigned apiVersion,
122 NetworkOPs::FailHard failType,
123 Role role,
124 std::chrono::seconds validatedLedgerAge,
125 Application& app,
126 ProcessTransactionFn const& processTransaction);
127
128} // namespace RPC
129} // namespace ripple
130
131#endif
Represents a JSON value.
Definition json_value.h:130
Provides server functionality for clients.
Definition NetworkOPs.h:70
virtual void processTransaction(std::shared_ptr< Transaction > &transaction, bool bUnlimited, bool bLocal, FailHard failType)=0
Process transactions as they arrive from the network or which are submitted by clients.
static int constexpr defaultAutoFillFeeMultiplier
static int constexpr defaultAutoFillFeeDivisor
Json::Value transactionSign(Json::Value jvRequest, unsigned apiVersion, NetworkOPs::FailHard failType, Role role, std::chrono::seconds validatedLedgerAge, Application &app)
Returns a Json::objectValue.
std::function< void(std::shared_ptr< Transaction > &transaction, bool bUnlimited, bool bLocal, NetworkOPs::FailHard failType)> ProcessTransactionFn
Json::Value transactionSubmitMultiSigned(Json::Value jvRequest, unsigned apiVersion, NetworkOPs::FailHard failType, Role role, std::chrono::seconds validatedLedgerAge, Application &app, ProcessTransactionFn const &processTransaction)
Returns a Json::objectValue.
static constexpr std::integral_constant< unsigned, Version > apiVersion
Definition ApiVersion.h:39
Json::Value getCurrentNetworkFee(Role const role, Config const &config, LoadFeeTrack const &feeTrack, TxQ const &txQ, Application const &app, Json::Value const &tx, int mult, int div)
Json::Value transactionSubmit(Json::Value jvRequest, unsigned apiVersion, NetworkOPs::FailHard failType, Role role, std::chrono::seconds validatedLedgerAge, Application &app, ProcessTransactionFn const &processTransaction)
Returns a Json::objectValue.
ProcessTransactionFn getProcessTxnFn(NetworkOPs &netOPs)
Json::Value transactionSignFor(Json::Value jvRequest, unsigned apiVersion, NetworkOPs::FailHard failType, Role role, std::chrono::seconds validatedLedgerAge, Application &app)
Returns a Json::objectValue.
Json::Value checkFee(Json::Value &request, Role const role, bool doAutoFill, Config const &config, LoadFeeTrack const &feeTrack, TxQ const &txQ, Application const &app)
Fill in the fee on behalf of the client.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
Role
Indicates the level of administrative permission to grant.
Definition Role.h:25