ledger-core
Public Member Functions | Static Public Attributes | List of all members
ledger::core::RippleLikeAccount Class Reference
+ Inheritance diagram for ledger::core::RippleLikeAccount:
+ Collaboration diagram for ledger::core::RippleLikeAccount:

Public Member Functions

 RippleLikeAccount (const std::shared_ptr< AbstractWallet > &wallet, int32_t index, const std::shared_ptr< RippleLikeBlockchainExplorer > &explorer, const std::shared_ptr< RippleLikeBlockchainObserver > &observer, const std::shared_ptr< RippleLikeAccountSynchronizer > &synchronizer, const std::shared_ptr< RippleLikeKeychain > &keychain)
 
FuturePtr< RippleLikeBlockchainExplorerTransactiongetTransaction (const std::string &hash)
 
void inflateOperation (Operation &out, const std::shared_ptr< const AbstractWallet > &wallet, const RippleLikeBlockchainExplorerTransaction &tx)
 
int putTransaction (soci::session &sql, const RippleLikeBlockchainExplorerTransaction &transaction)
 
bool putBlock (soci::session &sql, const RippleLikeBlockchainExplorer::Block &block)
 
std::shared_ptr< RippleLikeKeychaingetKeychain () const
 
FuturePtr< AmountgetBalance () override
 
Future< AbstractAccount::AddressList > getFreshPublicAddresses () override
 
Future< std::vector< std::shared_ptr< api::Amount > > > getBalanceHistory (const std::string &start, const std::string &end, api::TimePeriod precision) override
 
Future< api::ErrorCodeeraseDataSince (const std::chrono::system_clock::time_point &date) override
 
bool isSynchronizing () override
 
std::shared_ptr< api::EventBussynchronize () override
 
void startBlockchainObservation () override
 
void stopBlockchainObservation () override
 
bool isObservingBlockchain () override
 
std::string getRestoreKey () override
 
void broadcastRawTransaction (const std::vector< uint8_t > &transaction, const std::shared_ptr< api::StringCallback > &callback) override
 
void broadcastTransaction (const std::shared_ptr< api::RippleLikeTransaction > &transaction, const std::shared_ptr< api::StringCallback > &callback) override
 
std::shared_ptr< api::RippleLikeTransactionBuilderbuildTransaction () override
 
std::shared_ptr< api::OperationQueryqueryOperations () override
 
void getFees (const std::shared_ptr< api::AmountCallback > &callback) override
 
FuturePtr< api::AmountgetFees ()
 
void getBaseReserve (const std::shared_ptr< api::AmountCallback > &callback) override
 
FuturePtr< api::AmountgetBaseReserve ()
 
void isAddressActivated (const std::string &address, const std::shared_ptr< api::BoolCallback > &isActivated) override
 
Future< bool > isAddressActivated (const std::string &address)
 
- Public Member Functions inherited from ledger::core::api::RippleLikeAccount
virtual void broadcastRawTransaction (const std::vector< uint8_t > &transaction, const std::shared_ptr< StringCallback > &callback)=0
 
virtual void broadcastTransaction (const std::shared_ptr< RippleLikeTransaction > &transaction, const std::shared_ptr< StringCallback > &callback)=0
 
virtual void getFees (const std::shared_ptr< AmountCallback > &callback)=0
 
virtual void getBaseReserve (const std::shared_ptr< AmountCallback > &callback)=0
 
virtual void isAddressActivated (const std::string &address, const std::shared_ptr< BoolCallback > &isActivated)=0
 
- Public Member Functions inherited from ledger::core::AbstractAccount
 AbstractAccount (const std::shared_ptr< AbstractWallet > &wallet, int32_t index)
 
int32_t getIndex () override
 
std::shared_ptr< api::PreferencesgetPreferences () override
 
std::shared_ptr< api::LoggergetLogger () override
 
bool isInstanceOfBitcoinLikeAccount () override
 
bool isInstanceOfEthereumLikeAccount () override
 
bool isInstanceOfRippleLikeAccount () override
 
api::WalletType getWalletType () override
 
std::shared_ptr< api::PreferencesgetOperationPreferences (const std::string &uid) override
 
std::shared_ptr< api::BitcoinLikeAccountasBitcoinLikeAccount () override
 
std::shared_ptr< api::EthereumLikeAccountasEthereumLikeAccount () override
 
std::shared_ptr< api::RippleLikeAccountasRippleLikeAccount () override
 
std::shared_ptr< api::TezosLikeAccountasTezosLikeAccount () override
 
virtual std::shared_ptr< PreferencesgetOperationExternalPreferences (const std::string &uid)
 
virtual std::shared_ptr< PreferencesgetOperationInternalPreferences (const std::string &uid)
 
virtual std::shared_ptr< PreferencesgetInternalPreferences () const
 
virtual std::shared_ptr< PreferencesgetExternalPreferences () const
 
virtual std::shared_ptr< spdlog::logger > logger () const
 
virtual const std::string & getAccountUid () const
 
virtual std::shared_ptr< AbstractWalletgetWallet () const
 
virtual std::shared_ptr< AbstractWalletgetWallet ()
 
const std::shared_ptr< api::ExecutionContextgetMainExecutionContext () const
 
void getLastBlock (const std::shared_ptr< api::BlockCallback > &callback) override
 
Future< api::BlockgetLastBlock ()
 
void getBalance (const std::shared_ptr< api::AmountCallback > &callback) override
 
void getFreshPublicAddresses (const std::shared_ptr< api::AddressListCallback > &callback) override
 
void getBalanceHistory (const std::string &start, const std::string &end, api::TimePeriod precision, const std::shared_ptr< api::AmountListCallback > &callback) override
 
std::shared_ptr< api::EventBusgetEventBus () override
 
void emitEventsNow ()
 
void eraseDataSince (const std::chrono::system_clock::time_point &date, const std::shared_ptr< api::ErrorCodeCallback > &callback) override
 
- Public Member Functions inherited from ledger::core::DedicatedContext
 DedicatedContext (const std::shared_ptr< api::ExecutionContext > &context)
 
template<typename T >
Future< T > async (std::function< T()> f)
 
template<typename T >
Future< T > async (std::function< T()> f) const
 
Future< Unitrun (std::function< void()> f)
 
std::shared_ptr< api::ExecutionContextgetContext () const
 
- Public Member Functions inherited from ledger::core::api::Account
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 void getFreshPublicAddresses (const std::shared_ptr< AddressListCallback > &callback)=0
 
virtual void getLastBlock (const std::shared_ptr< BlockCallback > &callback)=0
 
virtual void eraseDataSince (const std::chrono::system_clock::time_point &date, const std::shared_ptr< ErrorCodeCallback > &callback)=0
 

Static Public Attributes

static const int FLAG_TRANSACTION_IGNORED = 0x00
 
static const int FLAG_NEW_TRANSACTION = 0x01
 
static const int FLAG_TRANSACTION_UPDATED = 0x01 << 1
 
- Static Public Attributes inherited from ledger::core::api::Account
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"}
 

Additional Inherited Members

- Public Types inherited from ledger::core::AbstractAccount
using AddressList = std::vector< std::shared_ptr< api::Address > >
 
- Protected Member Functions inherited from ledger::core::AbstractAccount
void emitNewOperationEvent (const Operation &operation)
 
void emitNewBlockEvent (const Block &block)
 
void pushEvent (const std::shared_ptr< api::Event > &event)
 
- Protected Attributes inherited from ledger::core::DedicatedContext
std::shared_ptr< api::ExecutionContext_executionContext
 

Member Function Documentation

◆ getRestoreKey()

std::string ledger::core::RippleLikeAccount::getRestoreKey ( )
overridevirtual

Get the key used to generate the account.

Implements ledger::core::api::Account.

◆ isObservingBlockchain()

bool ledger::core::RippleLikeAccount::isObservingBlockchain ( )
overridevirtual

Get account's observation status.

Returns
boolean

Implements ledger::core::api::Account.

◆ isSynchronizing()

bool ledger::core::RippleLikeAccount::isSynchronizing ( )
overridevirtual

Get synchronization status of account.

Returns
bool

Implements ledger::core::api::Account.

◆ queryOperations()

std::shared_ptr< api::OperationQuery > ledger::core::RippleLikeAccount::queryOperations ( )
overridevirtual

Get the list of all operations.

Reimplemented from ledger::core::AbstractAccount.

◆ startBlockchainObservation()

void ledger::core::RippleLikeAccount::startBlockchainObservation ( )
overridevirtual

Start observing blockchain on which account synchronizes and send/receive transactions.

Implements ledger::core::api::Account.

◆ stopBlockchainObservation()

void ledger::core::RippleLikeAccount::stopBlockchainObservation ( )
overridevirtual

Stop observing blockchain.

Implements ledger::core::api::Account.

◆ synchronize()

std::shared_ptr< api::EventBus > ledger::core::RippleLikeAccount::synchronize ( )
overridevirtual

Start synchronization of account.

Returns
EventBus, handler will be notified of synchronization outcome

Implements ledger::core::api::Account.


The documentation for this class was generated from the following files: