xrpld
Loading...
Searching...
No Matches
utility.h
1#pragma once
2
3#include <test/jtx/Account.h>
4
5#include <xrpl/json/json_value.h>
6#include <xrpl/ledger/Ledger.h>
7#include <xrpl/protocol/STObject.h>
8
9#include <stdexcept>
10#include <vector>
11
12namespace xrpl::test::jtx {
13
16{
17 template <class String>
18 explicit ParseError(String const& s) : logic_error(s)
19 {
20 }
21};
22
29parse(json::Value const& jv);
30
34void
35sign(json::Value& jv, Account const& account, json::Value& sigObject);
36
40void
41sign(json::Value& jv, Account const& account);
42
44void
45fillFee(json::Value& jv, ReadView const& view);
46
48void
49fillSeq(json::Value& jv, ReadView const& view);
50
53cmdToJSONRPC(std::vector<std::string> const& args, beast::Journal j, unsigned int apiVersion);
54} // namespace xrpl::test::jtx
A generic endpoint for log messages.
Definition Journal.h:38
Represents a JSON value.
Definition json_value.h:130
A view into a ledger.
Definition ReadView.h:31
Immutable cryptographic account descriptor.
Definition jtx/Account.h:17
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:18