Offline Transaction Signing (OTS) 0.1.0
|
Abstract base class for cryptographic seed management. More...
#include <ots.hpp>
Public Member Functions | |
virtual | ~Seed ()=default |
Virtual destructor to ensure proper cleanup of derived classes. | |
virtual const WipeableString | phrase (const SeedLanguage &language, const std::string &password="") const =0 |
Generates the seed phrase in a specified language. | |
virtual const SeedIndices | indices (const std::string &password="") const =0 |
Gets the raw numeric values representing the seed (indices) | |
virtual const std::string & | fingerprint () const noexcept |
Provides a unique fingerprint for the seed. | |
virtual const Address & | address () const noexcept |
Address of the seed. | |
virtual const uint64_t | timestamp () const noexcept |
Gets the seed's creation timestamp. | |
virtual const uint64_t | height () const noexcept |
Gets the blockchain height associated with the seed. | |
virtual const Network & | network () const noexcept |
Gets the network associated with the seed. | |
virtual std::shared_ptr< Wallet > | wallet () noexcept |
Creates a wallet from the seed. | |
Seed (const Seed &)=delete | |
Seed & | operator= (const Seed &)=delete |
Seed (Seed &&) noexcept=default | |
Seed & | operator= (Seed &&) noexcept=default |
Static Public Member Functions | |
static std::vector< uint16_t > | mergeValues (const std::vector< uint16_t > &values1, const std::vector< uint16_t > &values2) |
Merges two seed values, so you can join multiple SeedQRs to one seed. | |
static std::vector< uint16_t > | mergeValues (const std::vector< std::vector< uint16_t > > &values) |
Merges multiple seed values, so you can join multiple SeedQRs to one seed. | |
static std::vector< uint16_t > | mergeAndZeorizeValues (std::vector< uint16_t > &values1, std::vector< uint16_t > &values2, bool del=true) |
Merges two seed values, so you can join multiple SeedQRs to one seed. | |
static std::vector< uint16_t > | mergeAndZeorizeValues (std::vector< std::vector< uint16_t > > &values, bool del=true) |
Merges multiple seed values, so you can join multiple SeedQRs to one seed. | |
static std::vector< uint16_t > | mergeWithPassword (const std::string &password, const std::vector< uint16_t > &values) |
Merge password with seed values. | |
static std::vector< uint16_t > | mergeWithPasswordAndZeorize (std::string &password, std::vector< uint16_t > &values, bool del=true) |
Merge password with seed values and zeroize password. | |
static std::vector< uint16_t > | mergeWithPassword (const WipeableString &password, const std::vector< uint16_t > &values) |
Merge password with seed values. | |
static std::vector< uint16_t > | mergeWithPasswordAndZeorize (const WipeableString &password, std::vector< uint16_t > &values, bool del=true) |
Merge password with seed values and zeroize values. | |
Protected Member Functions | |
Seed () | |
Protected Attributes | |
std::unique_ptr< Address > | m_address |
std::shared_ptr< Wallet > | m_wallet |
uint64_t | m_timestamp = 0 |
uint64_t | m_height = 0 |
std::unique_ptr< KeyStore, KeyStoreDeleter > | m_key |
Network | m_network |
Abstract base class for cryptographic seed management.
Provides core functionality for managing seeds
|
virtualdefault |
Virtual destructor to ensure proper cleanup of derived classes.
|
delete |
|
defaultnoexcept |
|
protected |
|
virtualnoexcept |
Address of the seed.
|
virtualnoexcept |
Provides a unique fingerprint for the seed.
|
virtualnoexcept |
Gets the blockchain height associated with the seed.
For Polyseed this is an estimation minus a security time span of 30 days in the past For Monero seeds it will be the same if the user provided a date, otherwise it will be the height the user provided, can be 0 also.
|
pure virtual |
Gets the raw numeric values representing the seed (indices)
Implemented in ots::MoneroSeed, ots::LegacySeed, and ots::Polyseed.
|
static |
Merges multiple seed values, so you can join multiple SeedQRs to one seed.
values | the collection of seed values to merge |
del | will delete all values after merging and zeroize them, default is true |
ots::exception::seed::LengthMismatch | If the seeds are not of the same size |
ots::exception::seed::TooFewValues | if not at least two values are provided |
|
static |
Merges two seed values, so you can join multiple SeedQRs to one seed.
values1 | First seed values to merge |
values2 | Second seed values to merge |
del | will delete both values after merging and zeroize them, default is true |
ots::exception::seed::LengthMismatch | If the seeds are not of the same size |
|
static |
Merges multiple seed values, so you can join multiple SeedQRs to one seed.
values | the collection of seed values to merge |
ots::exception::seed::LengthMismatch | If the seeds are not of the same size |
ots::exception::seed::TooFewValues | if not at least two values are provided |
|
static |
Merges two seed values, so you can join multiple SeedQRs to one seed.
values1 | First seed values to merge |
values2 | Second seed values to merge |
ots::exception::seed::LengthMismatch | If the seeds are not of the same size |
|
static |
Merge password with seed values.
password | for the seed ^ PBKDF2_SHA256(password) operation |
values | seed values to merge |
ots::exception::seed::MergeError | On failures |
|
static |
Merge password with seed values.
password | for the seed ^ PBKDF2 |
values | seed values to merge |
ots::exception::seed::MergeError | On failures |
|
static |
Merge password with seed values and zeroize values.
password | for the seed ^ PBKDF2 |
values | seed values to merge and zeroize |
ots::exception::seed::MergeError | On failures |
|
static |
Merge password with seed values and zeroize password.
password | for the seed ^ PBKDF2_SHA256(password) operation |
values | seed values to merge |
del | will delete password and values after merging and zeroize it, default is true |
ots::exception::seed::MergeError | On failures |
|
inlinevirtualnoexcept |
Gets the network associated with the seed.
Main importance is that the addresses are based on the key and the network - other network different keys
|
pure virtual |
Generates the seed phrase in a specified language.
language | SeedLanguage to generate phrase in |
ots::exception::seed::UnsupportedLanguage | If the language is not supported |
Implemented in ots::MoneroSeed, ots::LegacySeed, and ots::Polyseed.
|
virtualnoexcept |
Gets the seed's creation timestamp.
For Polyseed this is more exact as height() For Monero seeds it depends what was provided by the user, if there date was provided it will be more accurate, in case the block height on creation was provide this is also only a rough estimation
|
virtualnoexcept |
Creates a wallet from the seed.
will return always the same wallet, wallet is created only once.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |