|
Electroneum
|
Classes | |
| class | MicroCore |
| struct | outputs_visitor |
Typedefs | |
| using | json = nlohmann::json |
Functions | |
| bool | init_blockchain (const string &path, MicroCore *&mcore, Blockchain *&core_storage, bool testnet) |
| template<typename T > | |
| bool | parse_str_secret_key (const string &key_str, T &secret_key) |
| template bool | parse_str_secret_key< crypto::secret_key > (const string &key_str, crypto::secret_key &secret_key) |
| template bool | parse_str_secret_key< crypto::public_key > (const string &key_str, crypto::public_key &secret_key) |
| template bool | parse_str_secret_key< crypto::hash > (const string &key_str, crypto::hash &secret_key) |
| bool | get_tx_pub_key_from_str_hash (Blockchain &core_storage, const string &hash_str, transaction &tx) |
| bool | parse_str_address (const string &address_str, account_public_address &address, bool testnet) |
| string | print_address (const account_public_address &address, bool testnet) |
| string | print_sig (const signature &sig) |
| bool | is_separator (char c) |
| string | remove_trailing_path_separator (const string &in_path) |
| bf::path | remove_trailing_path_separator (const bf::path &in_path) |
| string | timestamp_to_str_gm (time_t timestamp, const char *format) |
| ostream & | operator<< (ostream &os, const account_public_address &addr) |
| bool | generate_key_image (const crypto::key_derivation &derivation, const std::size_t i, const crypto::secret_key &sec_key, const crypto::public_key &pub_key, crypto::key_image &key_img) |
| string | get_default_lmdb_folder (bool testnet) |
| bool | get_blockchain_path (const boost::optional< string > &bc_path, bf::path &blockchain_path, bool testnet) |
| uint64_t | sum_money_in_outputs (const transaction &tx) |
| pair< uint64_t, uint64_t > | sum_money_in_outputs (const string &json_str) |
| pair< uint64_t, uint64_t > | sum_money_in_outputs (const json &_json) |
| array< uint64_t, 4 > | summary_of_in_out_rct (const transaction &tx, vector< pair< txout_to_key, uint64_t >> &output_pub_keys, vector< txin_to_key > &input_key_imgs) |
| array< uint64_t, 6 > | summary_of_in_out_rct (const json &_json) |
| uint64_t | sum_money_in_inputs (const transaction &tx) |
| pair< uint64_t, uint64_t > | sum_money_in_inputs (const string &json_str) |
| pair< uint64_t, uint64_t > | sum_money_in_inputs (const json &_json) |
| uint64_t | count_nonrct_inputs (const transaction &tx) |
| uint64_t | count_nonrct_inputs (const string &json_str) |
| uint64_t | count_nonrct_inputs (const json &_json) |
| array< uint64_t, 2 > | sum_money_in_tx (const transaction &tx) |
| array< uint64_t, 2 > | sum_money_in_txs (const vector< transaction > &txs) |
| uint64_t | sum_fees_in_txs (const vector< transaction > &txs) |
| vector< pair< txout_to_key, uint64_t > > | get_ouputs (const transaction &tx) |
| vector< tuple< txout_to_key, uint64_t, uint64_t > > | get_ouputs_tuple (const transaction &tx) |
| uint64_t | get_mixin_no (const transaction &tx) |
| vector< uint64_t > | get_mixin_no (const string &json_str) |
| vector< uint64_t > | get_mixin_no (const json &_json) |
| vector< uint64_t > | get_mixin_no_in_txs (const vector< transaction > &txs) |
| vector< txin_to_key > | get_key_images (const transaction &tx) |
| bool | get_payment_id (const vector< uint8_t > &extra, crypto::hash &payment_id, crypto::hash8 &payment_id8) |
| bool | get_payment_id (const transaction &tx, crypto::hash &payment_id, crypto::hash8 &payment_id8) |
| array< size_t, 5 > | timestamp_difference (uint64_t t1, uint64_t t2) |
| string | read (string filename) |
| pair< string, double > | timestamps_time_scale (const vector< uint64_t > ×tamps, uint64_t timeN, uint64_t resolution, uint64_t time0) |
| bool | decode_ringct (const rct::rctSig &rv, const crypto::public_key pub, const crypto::secret_key &sec, unsigned int i, rct::key &mask, uint64_t &amount) |
| bool | url_decode (const std::string &in, std::string &out) |
| map< std::string, std::string > | parse_crow_post_data (const string &req_body) |
| string | decrypt (const std::string &ciphertext, const crypto::secret_key &skey, bool authenticated) |
| public_key | get_tx_pub_key_from_received_outs (const transaction &tx) |
| bool | is_output_ours (const size_t &output_index, const transaction &tx, const public_key &pub_tx_key, const secret_key &private_view_key, const public_key &public_spend_key) |
| bool | get_real_output_for_key_image (const key_image &ki, const transaction &tx, const secret_key &private_view_key, const public_key &public_spend_key, uint64_t output_idx, public_key output_pub_key) |
| bool | make_tx_from_json (const string &json_str, transaction &tx) |
| string | make_printable (const string &in_s) |
| string | get_human_readable_timestamp (uint64_t ts) |
| void | pause_execution (uint64_t no_seconds, const string &text) |
| double | get_xmr (uint64_t core_amount) |
| template<typename Iterator , typename Func > | |
| void | chunks (Iterator begin, Iterator end, iterator_traits< string::iterator >::difference_type k, Func f) |
| template<typename It > | |
| std::iterator_traits< It >::value_type | calc_median (It it_begin, It it_end) |
Some helper functions used in the example. Names are rather self-explanatory, so I think there is no reason for any detailed explanations here
| using etneg::json = typedef nlohmann::json |
| std::iterator_traits<It>::value_type etneg::calc_median | ( | It | it_begin, |
| It | it_end | ||
| ) |
| void etneg::chunks | ( | Iterator | begin, |
| Iterator | end, | ||
| iterator_traits< string::iterator >::difference_type | k, | ||
| Func | f | ||
| ) |
| uint64_t etneg::count_nonrct_inputs | ( | const transaction & | tx | ) |
| uint64_t etneg::count_nonrct_inputs | ( | const string & | json_str | ) |
| uint64_t etneg::count_nonrct_inputs | ( | const json & | _json | ) |
| bool etneg::decode_ringct | ( | const rct::rctSig & | rv, |
| const crypto::public_key | pub, | ||
| const crypto::secret_key & | sec, | ||
| unsigned int | i, | ||
| rct::key & | mask, | ||
| uint64_t & | amount | ||
| ) |
| string etneg::decrypt | ( | const std::string & | ciphertext, |
| const crypto::secret_key & | skey, | ||
| bool | authenticated | ||
| ) |
| bool etneg::generate_key_image | ( | const crypto::key_derivation & | derivation, |
| const std::size_t | i, | ||
| const crypto::secret_key & | sec_key, | ||
| const crypto::public_key & | pub_key, | ||
| crypto::key_image & | key_img | ||
| ) |
| bool etneg::get_blockchain_path | ( | const boost::optional< string > & | bc_path, |
| bf::path & | blockchain_path, | ||
| bool | testnet | ||
| ) |
| string etneg::get_default_lmdb_folder | ( | bool | testnet | ) |
| string etneg::get_human_readable_timestamp | ( | uint64_t | ts | ) |
| vector< txin_to_key > etneg::get_key_images | ( | const transaction & | tx | ) |
| uint64_t etneg::get_mixin_no | ( | const transaction & | tx | ) |
| vector< uint64_t > etneg::get_mixin_no | ( | const string & | json_str | ) |
| vector< uint64_t > etneg::get_mixin_no | ( | const json & | _json | ) |
| vector< uint64_t > etneg::get_mixin_no_in_txs | ( | const vector< transaction > & | txs | ) |
| vector< pair< txout_to_key, uint64_t > > etneg::get_ouputs | ( | const transaction & | tx | ) |
| vector< tuple< txout_to_key, uint64_t, uint64_t > > etneg::get_ouputs_tuple | ( | const transaction & | tx | ) |
| bool etneg::get_payment_id | ( | const vector< uint8_t > & | extra, |
| crypto::hash & | payment_id, | ||
| crypto::hash8 & | payment_id8 | ||
| ) |
| bool etneg::get_payment_id | ( | const transaction & | tx, |
| crypto::hash & | payment_id, | ||
| crypto::hash8 & | payment_id8 | ||
| ) |
| bool etneg::get_real_output_for_key_image | ( | const key_image & | ki, |
| const transaction & | tx, | ||
| const secret_key & | private_view_key, | ||
| const public_key & | public_spend_key, | ||
| uint64_t | output_idx, | ||
| public_key | output_pub_key | ||
| ) |
| public_key etneg::get_tx_pub_key_from_received_outs | ( | const transaction & | tx | ) |
| bool etneg::get_tx_pub_key_from_str_hash | ( | Blockchain & | core_storage, |
| const string & | hash_str, | ||
| transaction & | tx | ||
| ) |
Get transaction tx using given tx hash. Hash is represent as string here, so before we can tap into the blockchain, we need to pare it into crypto::hash object.
|
inline |
| bool etneg::init_blockchain | ( | const string & | path, |
| MicroCore *& | mcore, | ||
| Blockchain *& | core_storage, | ||
| bool | testnet | ||
| ) |
| bool etneg::is_output_ours | ( | const size_t & | output_index, |
| const transaction & | tx, | ||
| const public_key & | pub_tx_key, | ||
| const secret_key & | private_view_key, | ||
| const public_key & | public_spend_key | ||
| ) |
Check if given output (specified by output_index) belongs is ours based on our private view key and public spend key
|
inline |
Check if a character is a path seprator
| string etneg::make_printable | ( | const string & | in_s | ) |
| bool etneg::make_tx_from_json | ( | const string & | json_str, |
| transaction & | tx | ||
| ) |
| ostream & etneg::operator<< | ( | ostream & | os, |
| const account_public_address & | addr | ||
| ) |
| map< std::string, std::string > etneg::parse_crow_post_data | ( | const string & | req_body | ) |
| bool etneg::parse_str_address | ( | const string & | address_str, |
| account_public_address & | address, | ||
| bool | testnet | ||
| ) |
Parse monero address in a string form into cryptonote::account_public_address object
Parse key string, e.g., a viewkey in a string into crypto::secret_key or crypto::public_key depending on the template argument.
| template bool etneg::parse_str_secret_key< crypto::hash > | ( | const string & | key_str, |
| crypto::hash & | secret_key | ||
| ) |
| template bool etneg::parse_str_secret_key< crypto::public_key > | ( | const string & | key_str, |
| crypto::public_key & | secret_key | ||
| ) |
| template bool etneg::parse_str_secret_key< crypto::secret_key > | ( | const string & | key_str, |
| crypto::secret_key & | secret_key | ||
| ) |
| void etneg::pause_execution | ( | uint64_t | no_seconds, |
| const string & | text | ||
| ) |
| string etneg::print_address | ( | const account_public_address & | address, |
| bool | testnet | ||
| ) |
Return string representation of monero address
| string etneg::print_sig | ( | const signature & | sig | ) |
| string etneg::read | ( | string | filename | ) |
| string etneg::remove_trailing_path_separator | ( | const string & | in_path | ) |
Remove trailinig path separator.
| bf::path etneg::remove_trailing_path_separator | ( | const bf::path & | in_path | ) |
| uint64_t etneg::sum_fees_in_txs | ( | const vector< transaction > & | txs | ) |
| uint64_t etneg::sum_money_in_inputs | ( | const transaction & | tx | ) |
| pair< uint64_t, uint64_t > etneg::sum_money_in_inputs | ( | const string & | json_str | ) |
| pair< uint64_t, uint64_t > etneg::sum_money_in_inputs | ( | const json & | _json | ) |
| uint64_t etneg::sum_money_in_outputs | ( | const transaction & | tx | ) |
| pair< uint64_t, uint64_t > etneg::sum_money_in_outputs | ( | const string & | json_str | ) |
| pair< uint64_t, uint64_t > etneg::sum_money_in_outputs | ( | const json & | _json | ) |
| array< uint64_t, 2 > etneg::sum_money_in_tx | ( | const transaction & | tx | ) |
| array< uint64_t, 2 > etneg::sum_money_in_txs | ( | const vector< transaction > & | txs | ) |
| array< uint64_t, 4 > etneg::summary_of_in_out_rct | ( | const transaction & | tx, |
| vector< pair< txout_to_key, uint64_t >> & | output_pub_keys, | ||
| vector< txin_to_key > & | input_key_imgs | ||
| ) |
| array< uint64_t, 6 > etneg::summary_of_in_out_rct | ( | const json & | _json | ) |
| array< size_t, 5 > etneg::timestamp_difference | ( | uint64_t | t1, |
| uint64_t | t2 | ||
| ) |
| string etneg::timestamp_to_str_gm | ( | time_t | timestamp, |
| const char * | format | ||
| ) |
| pair< string, double > etneg::timestamps_time_scale | ( | const vector< uint64_t > & | timestamps, |
| uint64_t | timeN, | ||
| uint64_t | resolution, | ||
| uint64_t | time0 | ||
| ) |
| bool etneg::url_decode | ( | const std::string & | in, |
| std::string & | out | ||
| ) |
1.8.14