|
xrpld
|
Immutable cryptographic account descriptor. More...
#include <Account.h>

Classes | |
| struct | PrivateCtorTag |
Public Types | |
| enum class | AcctStringType { Base58Seed , Other } |
Public Member Functions | |
| Account ()=delete | |
| Account (Account &&)=default | |
| Account (Account const &)=default | |
| Account & | operator= (Account const &)=default |
| Account & | operator= (Account &&)=default |
| Account (std::string name, AccountID const &id) | |
| Create an Account from an account ID. | |
| Account (AcctStringType stringType, std::string base58SeedStr) | |
| Create an account from a base58 seed string. | |
| std::string const & | name () const |
| Return the name. | |
| PublicKey const & | pk () const |
| Return the public key. | |
| SecretKey const & | sk () const |
| Return the secret key. | |
| AccountID | id () const |
| Returns the Account ID. | |
| std::string const & | human () const |
| Returns the human readable public key. | |
| operator AccountID () const | |
| Implicit conversion to AccountID. | |
| IOU | operator[] (std::string const &s) const |
| Returns an IOU for the specified gateway currency. | |
| Account (std::string name, KeyType type=KeyType::Secp256k1) | |
| Create an account from a simple string name. | |
| Account (char const *name, KeyType type=KeyType::Secp256k1) | |
| Account (std::string name, std::pair< PublicKey, SecretKey > const &keys, Account::PrivateCtorTag) | |
Static Public Attributes | |
| static Account const | kMaster {"masterpassphrase"} |
| The master account. | |
Static Private Member Functions | |
| static Account | fromCache (AcctStringType stringType, std::string name, KeyType type) |
Private Attributes | |
| std::string | name_ |
| PublicKey | pk_ |
| SecretKey | sk_ |
| AccountID | id_ |
| std::string | human_ |
Static Private Attributes | |
| static std::unordered_map< std::pair< std::string, KeyType >, Account, beast::Uhash<> > | cache |
Immutable cryptographic account descriptor.
Definition at line 16 of file jtx/Account.h.
|
strong |
| Enumerator | |
|---|---|
| Base58Seed | |
| Other | |
Definition at line 55 of file jtx/Account.h.
|
delete |
|
default |
|
default |
| xrpl::test::jtx::Account::Account | ( | std::string | name, |
| KeyType | type = KeyType::Secp256k1 ) |
Create an account from a simple string name.
Definition at line 70 of file jtx/impl/Account.cpp.
| xrpl::test::jtx::Account::Account | ( | char const * | name, |
| KeyType | type = KeyType::Secp256k1 ) |
Definition at line 40 of file jtx/Account.h.
| xrpl::test::jtx::Account::Account | ( | std::string | name, |
| std::pair< PublicKey, SecretKey > const & | keys, | ||
| Account::PrivateCtorTag | ) |
Definition at line 31 of file jtx/impl/Account.cpp.
|
explicit |
Create an Account from an account ID.
Should only be used when the secret key is unavailable, such as for pseudo-accounts.
Definition at line 83 of file jtx/impl/Account.cpp.
| xrpl::test::jtx::Account::Account | ( | AcctStringType | stringType, |
| std::string | base58SeedStr ) |
Create an account from a base58 seed string.
Throws on invalid seed.
Definition at line 75 of file jtx/impl/Account.cpp.
|
nodiscard |
Return the name.
Definition at line 61 of file jtx/Account.h.
|
nodiscard |
Return the public key.
Definition at line 68 of file jtx/Account.h.
|
nodiscard |
Return the secret key.
Definition at line 75 of file jtx/Account.h.
|
nodiscard |
Returns the Account ID.
The Account ID is the uint160 hash of the public key.
Definition at line 85 of file jtx/Account.h.
|
nodiscard |
Returns the human readable public key.
Definition at line 92 of file jtx/Account.h.
| xrpl::test::jtx::Account::operator AccountID | ( | ) | const |
Implicit conversion to AccountID.
This allows passing an Account where an AccountID is expected.
Definition at line 102 of file jtx/Account.h.
| IOU xrpl::test::jtx::Account::operator[] | ( | std::string const & | s | ) | const |
Returns an IOU for the specified gateway currency.
Definition at line 92 of file jtx/impl/Account.cpp.
|
staticprivate |
Definition at line 44 of file jtx/impl/Account.cpp.
|
static |
The master account.
Definition at line 26 of file jtx/Account.h.
|
staticprivate |
Definition at line 112 of file jtx/Account.h.
|
private |
Definition at line 118 of file jtx/Account.h.
|
private |
Definition at line 119 of file jtx/Account.h.
|
private |
Definition at line 120 of file jtx/Account.h.
|
private |
Definition at line 121 of file jtx/Account.h.
|
private |
Definition at line 122 of file jtx/Account.h.