xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
tests
libxrpl
helpers
/libxrpl/helpers/Account.cpp
1
#include <helpers/Account.h>
2
3
#include <xrpl/protocol/KeyType.h>
4
#include <xrpl/protocol/PublicKey.h>
5
#include <xrpl/protocol/SecretKey.h>
6
#include <xrpl/protocol/Seed.h>
7
8
namespace
xrpl::test
{
9
10
Account
const
Account::kMaster
{
"masterpassphrase"
};
11
12
Account::Account
(
std::string_view
name
,
KeyType
type)
13
:
name_
(
name
)
14
,
keyPair_
(
generateKeyPair
(type,
generateSeed
(
name_
)))
15
,
id_
(
calcAccountID
(
keyPair_
.first))
16
{
17
}
18
19
}
// namespace xrpl::test
std::string_view
xrpl::test::Account::Account
Account(std::string_view name, KeyType type=KeyType::Secp256k1)
Create an account from a name.
Definition
/libxrpl/helpers/Account.cpp:12
xrpl::test::Account::name_
std::string name_
Definition
/libxrpl/helpers/Account.h:86
xrpl::test::Account::keyPair_
std::pair< PublicKey, SecretKey > keyPair_
Definition
/libxrpl/helpers/Account.h:87
xrpl::test::Account::kMaster
static Account const kMaster
The master account that holds all XRP in genesis.
Definition
/libxrpl/helpers/Account.h:29
xrpl::test::Account::name
std::string const & name() const noexcept
Return the human-readable name.
Definition
/libxrpl/helpers/Account.h:45
xrpl::test::Account::id_
AccountID id_
Definition
/libxrpl/helpers/Account.h:88
xrpl::test::jtx::Account
Immutable cryptographic account descriptor.
Definition
jtx/Account.h:21
xrpl::test
Definition
STLedgerEntry.h:21
xrpl::KeyType
KeyType
Definition
KeyType.h:8
xrpl::generateSeed
Seed generateSeed(std::string const &passPhrase)
Generate a seed deterministically.
Definition
Seed.cpp:58
xrpl::generateKeyPair
std::pair< PublicKey, SecretKey > generateKeyPair(KeyType type, Seed const &seed)
Generate a key pair deterministically.
Definition
SecretKey.cpp:338
xrpl::calcAccountID
AccountID calcAccountID(PublicKey const &pk)
Definition
AccountID.cpp:149
Generated by
1.17.0