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/server/LoadFeeTrack.h>
8#include <xrpl/server/NetworkOPs.h>
9
10namespace xrpl {
11
12// Forward declarations
13class Application;
14class LoadFeeTrack;
15class Transaction;
16class TxQ;
17
18namespace RPC {
19
20json::Value
22 Role const role,
23 Config const& config,
24 LoadFeeTrack const& feeTrack,
25 TxQ const& txQ,
26 Application const& app,
27 json::Value const& tx,
30
58json::Value
60 json::Value& request,
61 Role const role,
62 bool doAutoFill,
63 Config const& config,
64 LoadFeeTrack const& feeTrack,
65 TxQ const& txQ,
66 Application const& app);
67
68// Return a std::function<> that calls NetworkOPs::processTransaction.
71 bool bUnlimited,
72 bool bLocal,
73 NetworkOPs::FailHard failType)>;
74
77{
78 return [&netOPs](
80 bool bUnlimited,
81 bool bLocal,
82 NetworkOPs::FailHard failType) {
83 netOPs.processTransaction(transaction, bUnlimited, bLocal, failType);
84 };
85}
86
90 json::Value params, // Passed by value so it can be modified locally.
91 unsigned apiVersion,
92 NetworkOPs::FailHard failType,
93 Role role,
94 std::chrono::seconds validatedLedgerAge,
95 Application& app);
96
100 json::Value params, // Passed by value so it can be modified locally.
101 unsigned apiVersion,
102 NetworkOPs::FailHard failType,
103 Role role,
104 std::chrono::seconds validatedLedgerAge,
105 Application& app,
106 ProcessTransactionFn const& processTransaction);
107
111 json::Value params, // Passed by value so it can be modified locally.
112 unsigned apiVersion,
113 NetworkOPs::FailHard failType,
114 Role role,
115 std::chrono::seconds validatedLedgerAge,
116 Application& app);
117
121 json::Value params, // Passed by value so it can be modified locally.
122 unsigned apiVersion,
123 NetworkOPs::FailHard failType,
124 Role role,
125 std::chrono::seconds validatedLedgerAge,
126 Application& app,
127 ProcessTransactionFn const& processTransaction);
128
129} // namespace RPC
130} // namespace xrpl
Represents a JSON value.
Definition json_value.h:130
Manages the current fee schedule.
Provides server functionality for clients.
Definition NetworkOPs.h:71
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:40
static constexpr int kDefaultAutoFillFeeDivisor
static constexpr int kDefaultAutoFillFeeMultiplier
API version numbers used in later API versions.
Definition ApiVersion.h:35
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.
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 transactionSign(json::Value jvRequest, unsigned apiVersion, NetworkOPs::FailHard failType, Role role, std::chrono::seconds validatedLedgerAge, Application &app)
Returns a json::ValueType::Object.
std::function< void( std::shared_ptr< Transaction > &transaction, bool bUnlimited, bool bLocal, NetworkOPs::FailHard failType)> ProcessTransactionFn
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.
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 getCurrentNetworkFee(Role const role, Config const &config, LoadFeeTrack const &feeTrack, TxQ const &txQ, Application const &app, json::Value const &tx, int mult, int div)
ProcessTransactionFn getProcessTxnFn(NetworkOPs &netOPs)
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:24