Ledger
onSync(OnSyncFunction) [Ledger class]
Registers a function to be called when the ledger is synchronized. This method takes a std::function which can be a C++ lambda, which can be useful for calling a method implemented in a non-static C++ class.
// PROTOTYPE
int onSync(OnSyncFunction callback);
// CALLBACK DEFINITIONS
typedef std::function<void(Ledger)> OnSyncFunction;
// CALLBACK PROTOTYPE
void myCallback(Ledger ledger)
// CALLBACK LAMBDA
myLedger.onSync([](Ledger ledger) {
// Code to run when synchronization completes goes here
}