xrpld
Loading...
Searching...
No Matches
utility.h
1#pragma once
2
3#include <test/jtx/Account.h>
4
5#include <xrpl/beast/utility/Journal.h>
6#include <xrpl/json/json_value.h>
7#include <xrpl/ledger/ReadView.h>
8#include <xrpl/protocol/STObject.h>
9
10#include <stdexcept>
11#include <string>
12#include <vector>
13
14namespace xrpl::test::jtx {
15
20{
21 template <class String>
22 explicit ParseError(String const& s) : logic_error(s)
23 {
24 }
25};
26
34parse(json::Value const& jv);
35
40void
41sign(json::Value& jv, Account const& account, json::Value& sigObject);
42
47void
48sign(json::Value& jv, Account const& account);
49
53void
54fillFee(json::Value& jv, ReadView const& view);
55
59void
60fillSeq(json::Value& jv, ReadView const& view);
61
66cmdToJSONRPC(std::vector<std::string> const& args, beast::Journal j, unsigned int apiVersion);
67} // namespace xrpl::test::jtx
A generic endpoint for log messages.
Definition Journal.h:44
Represents a JSON value.
Definition json_value.h:117
A view into a ledger.
Definition ReadView.h:41
Immutable cryptographic account descriptor.
Definition jtx/Account.h:21
void fillFee(json::Value &jv, ReadView const &view)
Set the fee automatically.
Definition utility.cpp:57
void sign(json::Value &jv, Account const &account, json::Value &sigObject)
Sign automatically into a specific Json field of the jv object.
Definition utility.cpp:40
STObject parse(json::Value const &jv)
Convert JSON to STObject.
Definition utility.cpp:31
json::Value cmdToJSONRPC(std::vector< std::string > const &args, beast::Journal j, unsigned int apiVersion)
Given an xrpld unit test rpc command, return the corresponding JSON.
Definition utility.cpp:94
void fillSeq(json::Value &jv, ReadView const &view)
Set the sequence number automatically.
Definition utility.cpp:80
ParseError(String const &s)
Definition utility.h:22