ledger-core
|
#include <Account.hpp>
Public Member Functions | |
virtual int32_t | getIndex ()=0 |
virtual std::shared_ptr< OperationQuery > | queryOperations ()=0 |
virtual void | getBalance (const std::shared_ptr< AmountCallback > &callback)=0 |
virtual void | getBalanceHistory (const std::string &start, const std::string &end, TimePeriod period, const std::shared_ptr< AmountListCallback > &callback)=0 |
virtual bool | isSynchronizing ()=0 |
virtual std::shared_ptr< EventBus > | synchronize ()=0 |
virtual std::shared_ptr< Preferences > | getPreferences ()=0 |
virtual std::shared_ptr< Logger > | getLogger ()=0 |
virtual std::shared_ptr< Preferences > | getOperationPreferences (const std::string &uid)=0 |
virtual std::shared_ptr< BitcoinLikeAccount > | asBitcoinLikeAccount ()=0 |
virtual std::shared_ptr< EthereumLikeAccount > | asEthereumLikeAccount ()=0 |
virtual std::shared_ptr< RippleLikeAccount > | asRippleLikeAccount ()=0 |
virtual std::shared_ptr< TezosLikeAccount > | asTezosLikeAccount ()=0 |
virtual bool | isInstanceOfBitcoinLikeAccount ()=0 |
virtual bool | isInstanceOfEthereumLikeAccount ()=0 |
virtual bool | isInstanceOfRippleLikeAccount ()=0 |
virtual void | getFreshPublicAddresses (const std::shared_ptr< AddressListCallback > &callback)=0 |
virtual WalletType | getWalletType ()=0 |
virtual std::shared_ptr< EventBus > | getEventBus ()=0 |
virtual void | startBlockchainObservation ()=0 |
virtual void | stopBlockchainObservation ()=0 |
virtual bool | isObservingBlockchain ()=0 |
virtual void | getLastBlock (const std::shared_ptr< BlockCallback > &callback)=0 |
virtual std::string | getRestoreKey ()=0 |
virtual void | eraseDataSince (const std::chrono::system_clock::time_point &date, const std::shared_ptr< ErrorCodeCallback > &callback)=0 |
Static Public Attributes | |
static std::string const | EV_SYNC_DURATION_MS = {"EV_SYNC_DURATION_MS"} |
static std::string const | EV_SYNC_ERROR_CODE = {"EV_SYNC_ERROR_CODE"} |
static std::string const | EV_SYNC_ERROR_CODE_INT = {"EV_SYNC_ERROR_CODE_INT"} |
static std::string const | EV_SYNC_ERROR_MESSAGE = {"EV_SYNC_ERROR_MESSAGE"} |
static std::string const | EV_NEW_BLOCK_CURRENCY_NAME = {"EV_NEW_BLOCK_CURRENCY_NAME"} |
static std::string const | EV_NEW_BLOCK_HASH = {"EV_NEW_BLOCK_HASH"} |
static std::string const | EV_NEW_BLOCK_HEIGHT = {"EV_NEW_BLOCK_HEIGHT"} |
static std::string const | EV_NEW_OP_WALLET_NAME = {"EV_NEW_OP_WALLET_NAME"} |
static std::string const | EV_NEW_OP_ACCOUNT_INDEX = {"EV_NEW_OP_ACCOUNT_INDEX"} |
static std::string const | EV_NEW_OP_UID = {"EV_NEW_OP_UID"} |
Class representing an account.
|
pure virtual |
Turn the account into an Bitcoin one, allowing operations to be performed on the Bitcoin network.
Implemented in ledger::core::BitcoinLikeAccount, and ledger::core::AbstractAccount.
|
pure virtual |
Turn the account into an Ethereum one, allowing operations to be performrd on the Ethereum network.
Implemented in ledger::core::EthereumLikeAccount, and ledger::core::AbstractAccount.
|
pure virtual |
Turn the account into a Ripple one, allowing operations to be performed on the Ripple network.
Implemented in ledger::core::AbstractAccount.
|
pure virtual |
Turn the account into a Tezos one, allowing operations to be performed on the Tezos network.
Implemented in ledger::core::AbstractAccount.
|
pure virtual |
Erase data (in user's DB) relative to wallet since given date.
date,start | date of data deletion |
|
pure virtual |
|
pure virtual |
Get balance of account at a precise interval with a certain granularity.
start,lower | bound of search range |
end,upper | bound of search range |
precision,granularity | at which we want results |
callback,ListCallback | returning a list of Amount object which represents account's balance |
|
pure virtual |
Get event bus through which account is notified on synchronization status.
Implemented in ledger::core::AbstractAccount.
|
pure virtual |
TODO
|
pure virtual |
Get index of account in user's wallet 32-bit integer
Implemented in ledger::core::AbstractAccount.
|
pure virtual |
|
pure virtual |
Return account's logger which provides all needed (e.g. database) logs.
Implemented in ledger::core::AbstractAccount.
|
pure virtual |
Return operation for a specific operation.
uid,string | of operation id |
Implemented in ledger::core::AbstractAccount.
|
pure virtual |
Return account's preferences.
Implemented in ledger::core::AbstractAccount.
|
pure virtual |
Get the key used to generate the account.
Implemented in ledger::core::BitcoinLikeAccount, ledger::core::TezosLikeAccount, ledger::core::EthereumLikeAccount, and ledger::core::RippleLikeAccount.
|
pure virtual |
Get type of wallet to which account belongs.
Implemented in ledger::core::AbstractAccount.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Get account's observation status.
Implemented in ledger::core::TezosLikeAccount, ledger::core::EthereumLikeAccount, ledger::core::RippleLikeAccount, and ledger::core::BitcoinLikeAccount.
|
pure virtual |
Get synchronization status of account.
Implemented in ledger::core::TezosLikeAccount, ledger::core::BitcoinLikeAccount, ledger::core::EthereumLikeAccount, and ledger::core::RippleLikeAccount.
|
pure virtual |
Get the list of all operations.
Implemented in ledger::core::TezosLikeAccount, ledger::core::BitcoinLikeAccount, ledger::core::EthereumLikeAccount, ledger::core::RippleLikeAccount, and ledger::core::AbstractAccount.
|
pure virtual |
Start observing blockchain on which account synchronizes and send/receive transactions.
Implemented in ledger::core::TezosLikeAccount, ledger::core::EthereumLikeAccount, ledger::core::RippleLikeAccount, and ledger::core::BitcoinLikeAccount.
|
pure virtual |
Stop observing blockchain.
Implemented in ledger::core::TezosLikeAccount, ledger::core::EthereumLikeAccount, ledger::core::RippleLikeAccount, and ledger::core::BitcoinLikeAccount.
|
pure virtual |
Start synchronization of account.
Implemented in ledger::core::TezosLikeAccount, ledger::core::BitcoinLikeAccount, ledger::core::EthereumLikeAccount, and ledger::core::RippleLikeAccount.
|
static |
TODO
|
static |
TODO
|
static |
Key of the synchronization duration time in the synchronize event payload. The value is stored in a int 64 time expressed in miliseconds.
|
static |
Key of the synchronization error code. The code is a stringified version of the value in the ErrorCode enum.
|
static |
Key of the synchronization error message. The message is stored as a string.