Scorum
|
Wallet. More...
#include <wallet.hpp>
Public Types | |
using | exit_func_type = std::function< void()> |
Public Member Functions | |
wallet_api (const wallet_data &initial_data, fc::api< login_api > rapi) | |
virtual | ~wallet_api () |
void | set_exit_func (exit_func_type) |
bool | copy_wallet_file (const std::string &destination_filename) |
std::map< std::string, std::function< std::string(fc::variant, const fc::variants &)> > | get_result_formatters () const |
void | encrypt_keys () |
void | check_memo (const std::string &memo, const account_api_obj &account) const |
std::string | get_encrypted_memo (const std::string &from, const std::string &to, const std::string &memo) |
std::string | decrypt_memo (const std::string &memo) |
void | exit () |
variant_object | about () const |
std::string | help () const |
std::string | gethelp (const std::string &method) const |
std::string | get_wallet_filename () const |
bool | is_new () const |
bool | is_locked () const |
void | lock () |
void | unlock (const std::string &password) |
void | set_password (const std::string &password) |
bool | load_wallet_file (const std::string &wallet_filename="") |
void | save_wallet_file (const std::string &wallet_filename="") |
void | set_wallet_filename (const std::string &wallet_filename) |
operation | get_prototype_operation (const std::string &operation_type) |
std::string | serialize_transaction (const signed_transaction &tx) const |
annotated_signed_transaction | sign_transaction (const signed_transaction &tx, bool broadcast=false) |
void | set_transaction_expiration (uint32_t seconds) |
void | network_add_nodes (const std::vector< std::string > &nodes) |
std::vector< variant > | network_get_connected_peers () |
bool | import_key (const std::string &wif_key) |
brain_key_info | suggest_brain_key () const |
std::map< public_key_type, std::string > | list_keys () |
std::string | get_private_key (const public_key_type &pubkey) const |
std::pair< public_key_type, std::string > | get_private_key_from_password (const std::string &account, const std::string &role, const std::string &password) const |
std::string | normalize_brain_key (const std::string &s) const |
optional< block_header > | get_block_header (uint32_t num) const |
optional< signed_block_api_obj > | get_block (uint32_t num) const |
std::map< uint32_t, block_header > | get_block_headers_history (uint32_t num, uint32_t limit) const |
std::map< uint32_t, signed_block_api_obj > | get_blocks_history (uint32_t num, uint32_t limit) const |
std::map< uint32_t, applied_operation > | get_ops_in_block (uint32_t block_num, applied_operation_type type_of_operation) const |
std::map< uint32_t, applied_operation > | get_ops_history (uint32_t from_op, uint32_t limit, applied_operation_type type_of_operation) const |
std::map< uint32_t, applied_operation > | get_ops_history_by_time (const fc::time_point_sec &from, const fc::time_point_sec &to, uint32_t from_op, uint32_t limit) const |
std::vector< block_api_object > | get_blocks (uint32_t from, uint32_t limit) const |
variant | info () |
chain_capital_api_obj | get_chain_capital () const |
std::vector< account_name_type > | get_active_witnesses () const |
std::vector< account_api_obj > | list_my_accounts () |
std::set< std::string > | list_accounts (const std::string &lowerbound, uint32_t limit) |
account_api_obj | get_account (const std::string &account_name) const |
account_balance_info_api_obj | get_account_balance (const std::string &account_name) const |
annotated_signed_transaction | create_account (const std::string &creator, const std::string &newname, const std::string &json_meta, bool broadcast) |
annotated_signed_transaction | create_account_with_keys (const std::string &creator, const std::string &newname, const std::string &json_meta, const public_key_type &owner, const public_key_type &active, const public_key_type &posting, const public_key_type &memo, bool broadcast) const |
annotated_signed_transaction | create_account_delegated (const std::string &creator, const asset &scorum_fee, const asset &delegated_scorumpower, const std::string &new_account_name, const std::string &json_meta, bool broadcast) |
annotated_signed_transaction | create_account_with_keys_delegated (const std::string &creator, const asset &scorum_fee, const asset &delegated_scorumpower, const std::string &newname, const std::string &json_meta, const public_key_type &owner, const public_key_type &active, const public_key_type &posting, const public_key_type &memo, bool broadcast) const |
annotated_signed_transaction | create_account_by_committee (const std::string &creator, const std::string &newname, const std::string &json_meta, bool broadcast) |
annotated_signed_transaction | create_account_by_committee_with_keys (const std::string &creator, const std::string &newname, const std::string &json_meta, const public_key_type &owner, const public_key_type &active, const public_key_type &posting, const public_key_type &memo, bool broadcast) const |
annotated_signed_transaction | update_account (const std::string &accountname, const std::string &json_meta, const public_key_type &owner, const public_key_type &active, const public_key_type &posting, const public_key_type &memo, bool broadcast) const |
annotated_signed_transaction | update_account_auth_key (const std::string &account_name, const authority_type &type, const public_key_type &key, authority_weight_type weight, bool broadcast) |
annotated_signed_transaction | update_account_auth_account (const std::string &account_name, authority_type type, const std::string &auth_account, authority_weight_type weight, bool broadcast) |
annotated_signed_transaction | update_account_auth_threshold (const std::string &account_name, authority_type type, uint32_t threshold, bool broadcast) |
annotated_signed_transaction | update_account_meta (const std::string &account_name, const std::string &json_meta, bool broadcast) |
annotated_signed_transaction | update_account_memo_key (const std::string &account_name, const public_key_type &key, bool broadcast) |
annotated_signed_transaction | delegate_scorumpower (const std::string &delegator, const std::string &delegatee, const asset &scorumpower, bool broadcast) |
annotated_signed_transaction | delegate_scorumpower_from_reg_pool (const std::string ®_committee_member, const std::string &delegatee, const asset &scorumpower, bool broadcast) |
std::set< account_name_type > | list_witnesses (const std::string &lowerbound, uint32_t limit) |
optional< witness_api_obj > | get_witness (const std::string &owner_account) |
annotated_signed_transaction | update_witness (const std::string &witness_name, const std::string &url, const public_key_type &block_signing_key, const chain_properties &props, bool broadcast=false) |
annotated_signed_transaction | set_voting_proxy (const std::string &account_to_modify, const std::string &proxy, bool broadcast=false) |
annotated_signed_transaction | vote_for_witness (const std::string &account_to_vote_with, const std::string &witness_to_vote_for, bool approve=true, bool broadcast=false) |
annotated_signed_transaction | transfer (const std::string &from, const std::string &to, const asset &amount, const std::string &memo, bool broadcast=false) |
annotated_signed_transaction | escrow_transfer (const std::string &from, const std::string &to, const std::string &agent, uint32_t escrow_id, const asset &scorum_amount, const asset &fee, time_point_sec ratification_deadline, time_point_sec escrow_expiration, const std::string &json_meta, bool broadcast=false) |
annotated_signed_transaction | escrow_approve (const std::string &from, const std::string &to, const std::string &agent, const std::string &who, uint32_t escrow_id, bool approve, bool broadcast=false) |
annotated_signed_transaction | escrow_dispute (const std::string &from, const std::string &to, const std::string &agent, const std::string &who, uint32_t escrow_id, bool broadcast=false) |
annotated_signed_transaction | escrow_release (const std::string &from, const std::string &to, const std::string &agent, const std::string &who, const std::string &receiver, uint32_t escrow_id, const asset &scorum_amount, bool broadcast=false) |
annotated_signed_transaction | transfer_to_scorumpower (const std::string &from, const std::string &to, const asset &amount, bool broadcast=false) |
annotated_signed_transaction | withdraw_scorumpower (const std::string &from, const asset &scorumpower, bool broadcast=false) |
annotated_signed_transaction | set_withdraw_scorumpower_route (const std::string &from, const std::string &to, uint16_t percent, bool auto_vest, bool broadcast=false) |
std::vector< withdraw_route > | get_withdraw_routes (const std::string &account, withdraw_route_type type=all) const |
annotated_signed_transaction | get_transaction (transaction_id_type trx_id) const |
annotated_signed_transaction | post_comment (const std::string &author, const std::string &permlink, const std::string &parent_author, const std::string &parent_permlink, const std::string &title, const std::string &body, const std::string &json, bool broadcast) |
annotated_signed_transaction | vote (const std::string &voter, const std::string &author, const std::string &permlink, int16_t weight, bool broadcast) |
annotated_signed_transaction | challenge (const std::string &challenger, const std::string &challenged, bool broadcast) |
annotated_signed_transaction | request_account_recovery (const std::string &recovery_account, const std::string &account_to_recover, const authority &new_authority, bool broadcast) |
annotated_signed_transaction | recover_account (const std::string &account_to_recover, const authority &recent_authority, const authority &new_authority, bool broadcast) |
annotated_signed_transaction | change_recovery_account (const std::string &owner, const std::string &new_recovery_account, bool broadcast) |
annotated_signed_transaction | prove (const std::string &challenged, bool broadcast) |
std::vector< owner_authority_history_api_obj > | get_owner_history (const std::string &account) const |
Get the owner history object. More... | |
std::map< uint32_t, applied_operation > | get_account_history (const std::string &account, uint64_t from, uint32_t limit) |
std::map< uint32_t, applied_operation > | get_account_scr_to_scr_transfers (const std::string &account, uint64_t from, uint32_t limit) |
std::map< uint32_t, applied_operation > | get_account_scr_to_sp_transfers (const std::string &account, uint64_t from, uint32_t limit) |
std::map< uint32_t, applied_withdraw_operation > | get_account_sp_to_scr_transfers (const std::string &account, uint64_t from, uint32_t limit) |
annotated_signed_transaction | decline_voting_rights (const std::string &account, bool decline, bool broadcast) |
std::vector< budget_api_obj > | list_my_budgets () |
std::set< std::string > | list_post_budget_owners (const std::string &lowerbound, uint32_t limit) |
std::set< std::string > | list_banner_budget_owners (const std::string &lowerbound, uint32_t limit) |
std::vector< budget_api_obj > | get_post_budgets (const std::string &account_name) |
std::vector< budget_api_obj > | get_banner_budgets (const std::string &account_name) |
annotated_signed_transaction | create_budget_for_post (const std::string &owner, const uuid_type &uuid, const std::string &json_metadata, const asset &balance, const time_point_sec &start, const time_point_sec &deadline, bool broadcast) |
annotated_signed_transaction | create_budget_for_banner (const std::string &owner, const uuid_type &uuid, const std::string &json_metadata, const asset &balance, const time_point_sec &start, const time_point_sec &deadline, bool broadcast) |
annotated_signed_transaction | update_budget_for_banner (const std::string &owner, const uuid_type &uuid, const std::string &json_metadata, bool broadcast) |
annotated_signed_transaction | update_budget_for_post (const std::string &owner, const uuid_type &uuid, const std::string &json_metadata, bool broadcast) |
annotated_signed_transaction | close_budget_for_post (const uuid_type &uuid, const std::string &owner, bool broadcast) |
annotated_signed_transaction | close_budget_for_banner (const uuid_type &uuid, const std::string &owner, bool broadcast) |
annotated_signed_transaction | close_budget_for_post_by_moderator (const uuid_type &uuid, const std::string &moderator, bool broadcast) |
annotated_signed_transaction | close_budget_for_banner_by_moderator (const uuid_type &uuid, const std::string &moderator, bool broadcast) |
annotated_signed_transaction | vote_for_committee_proposal (const std::string &account_to_vote_with, int64_t proposal_id, bool broadcast) |
annotated_signed_transaction | registration_committee_add_member (const std::string &inviter, const std::string &invitee, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | registration_committee_exclude_member (const std::string &initiator, const std::string &dropout, uint32_t lifetime_sec, bool broadcast) |
std::set< account_name_type > | list_registration_committee (const std::string &lowerbound, uint32_t limit) |
registration_committee_api_obj | get_registration_committee () |
std::vector< proposal_api_obj > | list_proposals () |
annotated_signed_transaction | registration_committee_change_add_member_quorum (const std::string &creator, uint64_t quorum_percent, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | registration_committee_change_exclude_member_quorum (const std::string &creator, uint64_t quorum_percent, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | registration_committee_change_base_quorum (const std::string &creator, uint64_t quorum_percent, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_committee_add_member (const std::string &initiator, const std::string &invitee, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_committee_exclude_member (const std::string &initiator, const std::string &dropout, uint32_t lifetime_sec, bool broadcast) |
std::set< account_name_type > | list_development_committee (const std::string &lowerbound, uint32_t limit) |
annotated_signed_transaction | development_committee_change_add_member_quorum (const std::string &creator, uint64_t quorum_percent, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_committee_change_exclude_member_quorum (const std::string &creator, uint64_t quorum_percent, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_committee_change_base_quorum (const std::string &creator, uint64_t quorum_percent, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_committee_change_transfer_quorum (const std::string &creator, uint64_t quorum_percent, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_committee_change_budget_auction_properties_quorum (const std::string &creator, uint64_t quorum_percent, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_committee_change_advertising_moderator_quorum (const std::string &creator, uint64_t quorum_percent, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_committee_change_betting_moderator_quorum (const std::string &creator, uint64_t quorum_percent, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_committee_empower_advertising_moderator (const std::string &initiator, const std::string &moderator, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_committee_empower_betting_moderator (const std::string &initiator, const std::string &moderator, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_committee_change_betting_resolve_delay (const std::string &initiator, uint32_t delay_sec, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_pool_transfer (const std::string &initiator, const std::string &to_account, asset amount, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_pool_withdraw_vesting (const std::string &initiator, asset amount, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_pool_post_budgets_auction_properties (const std::string &initiator, const std::vector< percent_type > &, uint32_t lifetime_sec, bool broadcast) |
annotated_signed_transaction | development_pool_banner_budgets_auction_properties (const std::string &initiator, const std::vector< percent_type > &, uint32_t lifetime_sec, bool broadcast) |
development_committee_api_obj | get_development_committee () |
std::vector< applied_operation > | get_devcommittee_history (uint64_t from, uint32_t limit) |
std::vector< applied_operation > | get_devcommittee_scr_to_scr_transfers (uint64_t from, uint32_t limit) |
std::vector< applied_withdraw_operation > | get_devcommittee_sp_to_scr_transfers (uint64_t from, uint32_t limit) |
atomicswap_contract_result_api_obj | atomicswap_initiate (const std::string &initiator, const std::string &participant, const asset &amount, const std::string &metadata, const uint8_t secret_length, bool broadcast) |
atomicswap_contract_result_api_obj | atomicswap_participate (const std::string &secret_hash, const std::string &participant, const std::string &initiator, const asset &amount, const std::string &metadata, bool broadcast) |
atomicswap_contract_info_api_obj | atomicswap_auditcontract (const std::string &from, const std::string &to, const std::string &secret_hash) |
annotated_signed_transaction | atomicswap_redeem (const std::string &from, const std::string &to, const std::string &secret, bool broadcast) |
std::string | atomicswap_extractsecret (const std::string &from, const std::string &to, const std::string &secret_hash) |
annotated_signed_transaction | atomicswap_refund (const std::string &participant, const std::string &initiator, const std::string &secret_hash, bool broadcast) |
std::vector< atomicswap_contract_api_obj > | get_atomicswap_contracts (const std::string &owner) |
annotated_signed_transaction | create_game (uuid_type uuid, account_name_type moderator, const std::string &json_metadata, fc::time_point_sec start_time, uint32_t auto_resolve_delay_sec, game_type game, const std::vector< market_type > &markets, bool broadcast) |
annotated_signed_transaction | cancel_game (uuid_type uuid, account_name_type moderator, bool broadcast) |
annotated_signed_transaction | update_game_markets (uuid_type uuid, account_name_type moderator, const std::vector< market_type > &markets, bool broadcast) |
annotated_signed_transaction | update_game_start_time (uuid_type uuid, account_name_type moderator, fc::time_point_sec start_time, bool broadcast) |
annotated_signed_transaction | post_game_results (uuid_type uuid, account_name_type moderator, const std::vector< wincase_type > &wincases, bool broadcast) |
annotated_signed_transaction | post_bet (uuid_type uuid, account_name_type better, uuid_type game_uuid, wincase_type wincase, odds_input odds, asset stake, bool is_live, bool broadcast) |
annotated_signed_transaction | cancel_pending_bets (account_name_type better, const std::vector< uuid_type > &bet_uuids, bool broadcast) |
std::vector< game_api_object > | get_games_by_status (const fc::flat_set< game_status > &filter) const |
std::vector< game_api_object > | get_games_by_uuids (const std::vector< uuid_type > &uuids) const |
std::vector< game_api_object > | lookup_games_by_id (game_id_type from, uint32_t limit) const |
std::vector< matched_bet_api_object > | lookup_matched_bets (matched_bet_id_type from, int64_t limit) const |
std::vector< pending_bet_api_object > | lookup_pending_bets (pending_bet_id_type from, int64_t limit) const |
std::vector< matched_bet_api_object > | get_matched_bets (const std::vector< uuid_type > &uuids) const |
std::vector< pending_bet_api_object > | get_pending_bets (const std::vector< uuid_type > &uuids) const |
betting_property_api_object | get_betting_properties () const |
std::vector< matched_bet_api_object > | get_game_returns (const uuid_type &game_uuid) const |
std::vector< winner_api_object > | get_game_winners (const uuid_type &game_uuid) const |
std::vector< matched_bet_api_object > | get_game_matched_bets (const uuid_type &uuid) const |
std::vector< pending_bet_api_object > | get_game_pending_bets (const uuid_type &uuid) const |
annotated_signed_transaction | create_nft (const std::string &owner, const uuid_type &uuid, const std::string &name, int32_t initial_power, const std::string &json_meta, bool broadcast) const |
annotated_signed_transaction | update_nft_meta (const std::string &moderator, const uuid_type &uuid, const std::string &json_meta, bool broadcast) const |
annotated_signed_transaction | adjust_nft_experience (const std::string &moderator, const uuid_type &uuid, int32_t experience, bool broadcast) const |
annotated_signed_transaction | update_nft_name (const std::string &moderator, const uuid_type &uuid, const std::string &name, bool broadcast) const |
nft_api_obj | get_nft_by_id (int64_t id) const |
nft_api_obj | get_nft_by_name (const account_name_type &name) const |
nft_api_obj | get_nft_by_uuid (const uuid_type &uuid) const |
std::vector< nft_api_obj > | lookup_nft (int64_t from, uint32_t limit) const |
annotated_signed_transaction | create_game_round (const std::string &owner, const uuid_type &uuid, const std::string &verification_key, const std::string &seed, bool broadcast) const |
annotated_signed_transaction | update_game_round_result (const std::string &owner, const uuid_type &uuid, const std::string &proof, const std::string &vrf, int32_t result, bool broadcast) const |
game_round_api_obj | get_game_round_by_uuid (const uuid_type &uuid) const |
std::vector< game_round_api_obj > | lookup_game_round (int64_t from, uint32_t limit) const |
Public Attributes | |
fc::signal< void(bool)> | lock_changed |
Wallet.
This wallet assumes it is connected to the database server with a high-bandwidth, low-latency connection and performs minimal caching. This API could be provided locally to be used by a web interface.
Definition at line 106 of file wallet.hpp.
using scorum::wallet::wallet_api::exit_func_type = std::function<void()> |
Definition at line 112 of file wallet.hpp.
scorum::wallet::wallet_api::wallet_api | ( | const wallet_data & | initial_data, |
fc::api< login_api > | rapi | ||
) |
Definition at line 1032 of file wallet.cpp.
|
virtual |
Definition at line 1038 of file wallet.cpp.
void scorum::wallet::wallet_api::check_memo | ( | const std::string & | memo, |
const account_api_obj & | account | ||
) | const |
Checks memos against private keys on account and imported in wallet
Definition at line 2005 of file wallet.cpp.
bool scorum::wallet::wallet_api::copy_wallet_file | ( | const std::string & | destination_filename | ) |
Definition at line 1047 of file wallet.cpp.
void scorum::wallet::wallet_api::encrypt_keys | ( | ) |
Encrypt keys
Definition at line 1312 of file wallet.cpp.
std::map< std::string, std::function< std::string(fc::variant, const fc::variants &)> > scorum::wallet::wallet_api::get_result_formatters | ( | ) | const |
Definition at line 1298 of file wallet.cpp.
void scorum::wallet::wallet_api::set_exit_func | ( | exit_func_type | fn | ) |
Definition at line 1042 of file wallet.cpp.
fc::signal<void(bool)> scorum::wallet::wallet_api::lock_changed |
Definition at line 2307 of file wallet.hpp.