xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
test
jtx
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/HashPrefix.h>
9
#include <xrpl/protocol/SField.h>
10
#include <xrpl/protocol/STObject.h>
11
#include <xrpl/protocol/Sign.h>
12
13
#include <
stdexcept
>
14
#include <
string
>
15
#include <
vector
>
16
17
namespace
xrpl::test::jtx
{
18
22
struct
ParseError
:
std::logic_error
23
{
24
template
<
class
String>
25
explicit
ParseError
(String
const
& s) :
logic_error
(s)
26
{
27
}
28
};
29
36
STObject
37
parse
(
json::Value
const
& jv);
38
45
SignatureRole
46
signatureRole
(
SField
const
* subField);
47
56
void
57
sign
(
58
json::Value
& jv,
59
Account
const
& account,
60
json::Value
& sigObject,
61
HashPrefix
prefix =
HashPrefix::TxSign
);
62
67
void
68
sign
(
json::Value
& jv,
Account
const
& account);
69
73
void
74
fillFee
(
json::Value
& jv,
ReadView
const
& view);
75
79
void
80
fillSeq
(
json::Value
& jv,
ReadView
const
& view);
81
85
json::Value
86
cmdToJSONRPC
(
std::vector<std::string>
const
& args,
beast::Journal
j,
unsigned
int
apiVersion);
87
}
// namespace xrpl::test::jtx
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:44
json::Value
Represents a JSON value.
Definition
json_value.h:117
xrpl::ReadView
A view into a ledger.
Definition
ReadView.h:41
xrpl::SField
Identifies fields.
Definition
SField.h:132
xrpl::STObject
Definition
STObject.h:49
xrpl::test::jtx::Account
Immutable cryptographic account descriptor.
Definition
jtx/Account.h:21
std::logic_error
xrpl::test::jtx
Definition
Oracle_test.cpp:34
xrpl::test::jtx::sign
void sign(json::Value &jv, Account const &account, json::Value &sigObject, HashPrefix prefix)
Sign automatically into a specific Json field of the jv object.
Definition
utility.cpp:52
xrpl::test::jtx::fillFee
void fillFee(json::Value &jv, ReadView const &view)
Set the fee automatically.
Definition
utility.cpp:69
xrpl::test::jtx::parse
STObject parse(json::Value const &jv)
Convert JSON to STObject.
Definition
utility.cpp:33
xrpl::test::jtx::cmdToJSONRPC
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:107
xrpl::test::jtx::fillSeq
void fillSeq(json::Value &jv, ReadView const &view)
Set the sequence number automatically.
Definition
utility.cpp:93
xrpl::test::jtx::signatureRole
SignatureRole signatureRole(SField const *subField)
The role that signs into an optional signature subfield.
Definition
utility.cpp:42
xrpl::SignatureRole
SignatureRole
The signature slots on a transaction.
Definition
Sign.h:23
xrpl::HashPrefix
HashPrefix
Prefix for hashing functions.
Definition
HashPrefix.h:35
xrpl::HashPrefix::TxSign
@ TxSign
inner transaction to sign
Definition
HashPrefix.h:64
stdexcept
string
xrpl::test::jtx::ParseError::ParseError
ParseError(String const &s)
Definition
utility.h:25
vector
Generated by
1.17.0