xrpld
Loading...
Searching...
No Matches
TransactionSign.h
1#pragma once
2
3#include <xrpld/core/Config.h>
4#include <xrpld/rpc/Role.h>
5#include <xrpld/rpc/detail/Tuning.h>
6
7#include <xrpl/json/json_value.h>
8#include <xrpl/server/LoadFeeTrack.h>
9#include <xrpl/server/NetworkOPs.h>
10
11#include <chrono>
12#include <functional>
13#include <memory>
14
15namespace xrpl {
16
17// Forward declarations
18class Application;
19class LoadFeeTrack;
20class Transaction;
21class TxQ;
22
23namespace rpc {
24
25json::Value
27 Role const role,
28 Config const& config,
29 LoadFeeTrack const& feeTrack,
30 TxQ const& txQ,
31 Application const& app,
32 json::Value const& tx,
35
64json::Value
66 json::Value& request,
67 Role const role,
68 bool doAutoFill,
69 Config const& config,
70 LoadFeeTrack const& feeTrack,
71 TxQ const& txQ,
72 Application const& app);
73
74// Return a std::function<> that calls NetworkOPs::processTransaction.
77 bool bUnlimited,
78 bool bLocal,
79 NetworkOPs::FailHard failType)>;
80
83{
84 return [&netOPs](
86 bool bUnlimited,
87 bool bLocal,
88 NetworkOPs::FailHard failType) {
89 netOPs.processTransaction(transaction, bUnlimited, bLocal, failType);
90 };
91}
92
98 json::Value params, // Passed by value so it can be modified locally.
99 unsigned apiVersion,
100 NetworkOPs::FailHard failType,
101 Role role,
102 std::chrono::seconds validatedLedgerAge,
103 Application& app);
104
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 ProcessTransactionFn const& processTransaction);
117
123 json::Value params, // Passed by value so it can be modified locally.
124 unsigned apiVersion,
125 NetworkOPs::FailHard failType,
126 Role role,
127 std::chrono::seconds validatedLedgerAge,
128 Application& app);
129
135 json::Value params, // Passed by value so it can be modified locally.
136 unsigned apiVersion,
137 NetworkOPs::FailHard failType,
138 Role role,
139 std::chrono::seconds validatedLedgerAge,
140 Application& app,
141 ProcessTransactionFn const& processTransaction);
142
143} // namespace rpc
144} // namespace xrpl
Represents a JSON value.
Definition json_value.h:117
Manages the current fee schedule.
Provides server functionality for clients.
Definition NetworkOPs.h:82
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.
Transaction Queue.
Definition TxQ.h:58
static constexpr int kDefaultAutoFillFeeMultiplier
static constexpr int kDefaultAutoFillFeeDivisor
API version numbers used in later API versions.
Definition ApiVersion.h:36
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::ValueType::Object.
std::function< void( std::shared_ptr< Transaction > &transaction, bool bUnlimited, bool bLocal, NetworkOPs::FailHard failType)> ProcessTransactionFn
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::ValueType::Object.
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::ValueType::Object.
json::Value transactionSign(json::Value jvRequest, unsigned apiVersion, NetworkOPs::FailHard failType, Role role, std::chrono::seconds validatedLedgerAge, Application &app)
Returns a json::ValueType::Object.
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:5
Role
Indicates the level of administrative permission to grant.
Definition Role.h:27