xrpld
Loading...
Searching...
No Matches
regkey.cpp
1#include <test/jtx/regkey.h>
2
3#include <test/jtx/Account.h>
4#include <test/jtx/tags.h>
5
6#include <xrpl/json/json_value.h>
7#include <xrpl/protocol/AccountID.h>
8#include <xrpl/protocol/jss.h>
9
10namespace xrpl::test::jtx {
11
12json::Value
13regkey(Account const& account, DisabledT)
14{
15 json::Value jv;
16 jv[jss::Account] = account.human();
17 jv[jss::TransactionType] = jss::SetRegularKey;
18 return jv;
19}
20
22regkey(Account const& account, Account const& signer)
23{
24 json::Value jv;
25 jv[jss::Account] = account.human();
26 jv["RegularKey"] = to_string(signer.id());
27 jv[jss::TransactionType] = jss::SetRegularKey;
28 return jv;
29}
30
31} // namespace xrpl::test::jtx
Represents a JSON value.
Definition json_value.h:130
Immutable cryptographic account descriptor.
Definition jtx/Account.h:17
AccountID id() const
Returns the Account ID.
Definition jtx/Account.h:85
json::Value regkey(Account const &account, DisabledT)
Disable the regular key.
Definition regkey.cpp:13
std::string to_string(BaseUInt< Bits, Tag > const &a)
Definition base_uint.h:633