3 #include <fc/crypto/base58.hpp>
4 #include <fc/real128.hpp>
31 static optional<memo_data>
from_string(
const std::string& str)
35 if (str.size() >
sizeof(
memo_data) && str[0] ==
'#')
37 auto data = fc::from_base58(str.substr(1));
38 auto m = fc::raw::unpack<memo_data>(data);
39 FC_ASSERT(std::string(m) == str);
46 return optional<memo_data>();
55 operator std::string()
const
57 auto data = fc::raw::pack(*
this);
58 auto base58 = fc::to_base58(data);
67 std::string ws_server =
"ws://localhost:8090";
82 class wallet_api_impl;
116 bool copy_wallet_file(
const std::string& destination_filename);
118 std::map<std::string, std::function<std::string(fc::variant,
const fc::variants&)>> get_result_formatters()
const;
135 std::string get_encrypted_memo(
const std::string& from,
const std::string& to,
const std::string& memo);
142 std::string decrypt_memo(
const std::string& memo);
159 variant_object about()
const;
171 std::string help()
const;
181 std::string gethelp(
const std::string& method)
const;
195 std::string get_wallet_filename()
const;
218 bool is_locked()
const;
237 void unlock(
const std::string& password);
247 void set_password(
const std::string& password);
264 bool load_wallet_file(
const std::string& wallet_filename =
"");
280 void save_wallet_file(
const std::string& wallet_filename =
"");
292 void set_wallet_filename(
const std::string& wallet_filename);
317 operation get_prototype_operation(
const std::string& operation_type);
345 void set_transaction_expiration(uint32_t seconds);
352 void network_add_nodes(
const std::vector<std::string>& nodes);
359 std::vector<variant> network_get_connected_peers();
376 bool import_key(
const std::string& wif_key);
398 std::map<public_key_type, std::string> list_keys();
413 std::pair<public_key_type, std::string> get_private_key_from_password(
const std::string& account,
414 const std::string& role,
415 const std::string& password)
const;
443 optional<block_header> get_block_header(uint32_t num)
const;
451 optional<signed_block_api_obj> get_block(uint32_t num)
const;
462 std::map<uint32_t, block_header> get_block_headers_history(uint32_t num, uint32_t limit)
const;
473 std::map<uint32_t, signed_block_api_obj> get_blocks_history(uint32_t num, uint32_t limit)
const;
483 std::map<uint32_t, applied_operation> get_ops_in_block(uint32_t block_num,
497 std::map<uint32_t, applied_operation>
512 std::map<uint32_t, applied_operation> get_ops_history_by_time(
const fc::time_point_sec& from,
513 const fc::time_point_sec& to,
515 uint32_t limit)
const;
525 std::vector<block_api_object> get_blocks(uint32_t from, uint32_t limit)
const;
548 std::vector<account_name_type> get_active_witnesses()
const;
554 std::vector<account_api_obj> list_my_accounts();
573 std::set<std::string> list_accounts(
const std::string& lowerbound, uint32_t limit);
605 const std::string& newname,
606 const std::string& json_meta,
628 const std::string& newname,
629 const std::string& json_meta,
634 bool broadcast)
const;
655 const asset& scorum_fee,
656 const asset& delegated_scorumpower,
657 const std::string& new_account_name,
658 const std::string& json_meta,
685 const asset& scorum_fee,
686 const asset& delegated_scorumpower,
687 const std::string& newname,
688 const std::string& json_meta,
693 bool broadcast)
const;
706 const std::string& newname,
707 const std::string& json_meta,
725 const std::string& newname,
726 const std::string& json_meta,
731 bool broadcast)
const;
744 const std::string& json_meta,
749 bool broadcast)
const;
789 const std::string& auth_account,
822 update_account_meta(
const std::string& account_name,
const std::string& json_meta,
bool broadcast);
832 update_account_memo_key(
const std::string& account_name,
const public_key_type& key,
bool broadcast);
843 const std::string& delegatee,
844 const asset& scorumpower,
856 const std::string& delegatee,
857 const asset& scorumpower,
878 std::set<account_name_type> list_witnesses(
const std::string& lowerbound, uint32_t limit);
887 optional<witness_api_obj> get_witness(
const std::string& owner_account);
901 const std::string& url,
904 bool broadcast =
false);
924 set_voting_proxy(
const std::string& account_to_modify,
const std::string& proxy,
bool broadcast =
false);
941 const std::string& witness_to_vote_for,
943 bool broadcast =
false);
956 const std::string& to,
958 const std::string& memo,
959 bool broadcast =
false);
979 const std::string& to,
980 const std::string& agent,
982 const asset& scorum_amount,
984 time_point_sec ratification_deadline,
985 time_point_sec escrow_expiration,
986 const std::string& json_meta,
987 bool broadcast =
false);
1004 const std::string& to,
1005 const std::string& agent,
1006 const std::string& who,
1009 bool broadcast =
false);
1022 const std::string& to,
1023 const std::string& agent,
1024 const std::string& who,
1026 bool broadcast =
false);
1041 const std::string& to,
1042 const std::string& agent,
1043 const std::string& who,
1044 const std::string& receiver,
1046 const asset& scorum_amount,
1047 bool broadcast =
false);
1062 const std::string& to,
1063 const asset& amount,
1064 bool broadcast =
false);
1078 withdraw_scorumpower(
const std::string& from,
const asset& scorumpower,
bool broadcast =
false);
1097 const std::string& from,
const std::string& to, uint16_t percent,
bool auto_vest,
bool broadcast =
false);
1105 std::vector<withdraw_route> get_withdraw_routes(
const std::string& account,
withdraw_route_type type = all)
const;
1129 const std::string& permlink,
1130 const std::string& parent_author,
1131 const std::string& parent_permlink,
1132 const std::string& title,
1133 const std::string& body,
1134 const std::string& json,
1148 const std::string& author,
1149 const std::string& permlink,
1163 challenge(
const std::string& challenger,
const std::string& challenged,
bool broadcast);
1183 const std::string& account_to_recover,
1219 change_recovery_account(
const std::string&
owner,
const std::string& new_recovery_account,
bool broadcast);
1237 std::vector<owner_authority_history_api_obj> get_owner_history(
const std::string& account)
const;
1251 std::map<uint32_t, applied_operation>
1252 get_account_history(
const std::string& account, uint64_t from, uint32_t limit);
1266 std::map<uint32_t, applied_operation>
1267 get_account_scr_to_scr_transfers(
const std::string& account, uint64_t from, uint32_t limit);
1281 std::map<uint32_t, applied_operation>
1282 get_account_scr_to_sp_transfers(
const std::string& account, uint64_t from, uint32_t limit);
1296 std::map<uint32_t, applied_withdraw_operation>
1297 get_account_sp_to_scr_transfers(
const std::string& account, uint64_t from, uint32_t limit);
1320 std::vector<budget_api_obj> list_my_budgets();
1330 std::set<std::string> list_post_budget_owners(
const std::string& lowerbound, uint32_t limit);
1340 std::set<std::string> list_banner_budget_owners(
const std::string& lowerbound, uint32_t limit);
1348 std::vector<budget_api_obj> get_post_budgets(
const std::string& account_name);
1356 std::vector<budget_api_obj> get_banner_budgets(
const std::string& account_name);
1375 const std::string& json_metadata,
1376 const asset& balance,
1377 const time_point_sec& start,
1378 const time_point_sec& deadline,
1398 const std::string& json_metadata,
1399 const asset& balance,
1400 const time_point_sec& start,
1401 const time_point_sec& deadline,
1415 const std::string& json_metadata,
1429 const std::string& json_metadata,
1451 close_budget_for_banner(
const uuid_type& uuid,
const std::string&
owner,
bool broadcast);
1462 close_budget_for_post_by_moderator(
const uuid_type& uuid,
const std::string& moderator,
bool broadcast);
1473 close_budget_for_banner_by_moderator(
const uuid_type& uuid,
const std::string& moderator,
bool broadcast);
1490 vote_for_committee_proposal(
const std::string& account_to_vote_with, int64_t proposal_id,
bool broadcast);
1501 const std::string& invitee,
1502 uint32_t lifetime_sec,
1514 const std::string& dropout,
1515 uint32_t lifetime_sec,
1525 std::set<account_name_type> list_registration_committee(
const std::string& lowerbound, uint32_t limit);
1539 std::vector<proposal_api_obj> list_proposals();
1551 uint64_t quorum_percent,
1552 uint32_t lifetime_sec,
1565 uint64_t quorum_percent,
1566 uint32_t lifetime_sec,
1578 uint64_t quorum_percent,
1579 uint32_t lifetime_sec,
1591 const std::string& invitee,
1592 uint32_t lifetime_sec,
1604 const std::string& dropout,
1605 uint32_t lifetime_sec,
1615 std::set<account_name_type> list_development_committee(
const std::string& lowerbound, uint32_t limit);
1626 uint64_t quorum_percent,
1627 uint32_t lifetime_sec,
1639 uint64_t quorum_percent,
1640 uint32_t lifetime_sec,
1652 uint64_t quorum_percent,
1653 uint32_t lifetime_sec,
1665 uint64_t quorum_percent,
1666 uint32_t lifetime_sec,
1678 const std::string& creator, uint64_t quorum_percent, uint32_t lifetime_sec,
bool broadcast);
1689 uint64_t quorum_percent,
1690 uint32_t lifetime_sec,
1701 uint64_t quorum_percent,
1702 uint32_t lifetime_sec,
1714 const std::string& moderator,
1715 uint32_t lifetime_sec,
1727 const std::string& moderator,
1728 uint32_t lifetime_sec,
1742 uint32_t lifetime_sec,
1755 const std::string& to_account,
1757 uint32_t lifetime_sec,
1770 uint32_t lifetime_sec,
1781 const std::vector<percent_type>&,
1782 uint32_t lifetime_sec,
1793 const std::vector<percent_type>&,
1794 uint32_t lifetime_sec,
1813 std::vector<applied_operation> get_devcommittee_history(uint64_t from, uint32_t limit);
1826 std::vector<applied_operation> get_devcommittee_scr_to_scr_transfers(uint64_t from, uint32_t limit);
1839 std::vector<applied_withdraw_operation> get_devcommittee_sp_to_scr_transfers(uint64_t from, uint32_t limit);
1866 const std::string& participant,
1867 const asset& amount,
1868 const std::string& metadata,
1869 const uint8_t secret_length,
1888 const std::string& participant,
1889 const std::string& initiator,
1890 const asset& amount,
1891 const std::string& metadata,
1902 atomicswap_auditcontract(
const std::string& from,
const std::string& to,
const std::string& secret_hash);
1917 atomicswap_redeem(
const std::string& from,
const std::string& to,
const std::string& secret,
bool broadcast);
1928 atomicswap_extractsecret(
const std::string& from,
const std::string& to,
const std::string& secret_hash);
1943 const std::string& initiator,
1944 const std::string& secret_hash,
1952 std::vector<atomicswap_contract_api_obj> get_atomicswap_contracts(
const std::string&
owner);
1977 const std::string& json_metadata,
1978 fc::time_point_sec start_time,
1979 uint32_t auto_resolve_delay_sec,
1981 const std::vector<market_type>& markets,
2003 const std::vector<market_type>& markets,
2027 const std::vector<wincase_type>& wincases,
2060 cancel_pending_bets(
account_name_type better,
const std::vector<uuid_type>& bet_uuids,
bool broadcast);
2068 std::vector<game_api_object> get_games_by_status(
const fc::flat_set<game_status>& filter)
const;
2076 std::vector<game_api_object> get_games_by_uuids(
const std::vector<uuid_type>& uuids)
const;
2085 std::vector<game_api_object> lookup_games_by_id(
game_id_type from, uint32_t limit)
const;
2094 std::vector<matched_bet_api_object> lookup_matched_bets(
matched_bet_id_type from, int64_t limit)
const;
2103 std::vector<pending_bet_api_object> lookup_pending_bets(
pending_bet_id_type from, int64_t limit)
const;
2111 std::vector<matched_bet_api_object> get_matched_bets(
const std::vector<uuid_type>& uuids)
const;
2119 std::vector<pending_bet_api_object> get_pending_bets(
const std::vector<uuid_type>& uuids)
const;
2134 std::vector<matched_bet_api_object> get_game_returns(
const uuid_type& game_uuid)
const;
2142 std::vector<winner_api_object> get_game_winners(
const uuid_type& game_uuid)
const;
2150 std::vector<matched_bet_api_object> get_game_matched_bets(
const uuid_type& uuid)
const;
2158 std::vector<pending_bet_api_object> get_game_pending_bets(
const uuid_type& uuid)
const;
2179 const std::string& name,
2180 int32_t initial_power,
2181 const std::string& json_meta,
2182 bool broadcast)
const;
2194 const std::string& json_meta,
2195 bool broadcast)
const;
2208 bool broadcast)
const;
2220 const std::string& name,
2221 bool broadcast)
const;
2253 std::vector<nft_api_obj> lookup_nft(int64_t from, uint32_t limit)
const;
2266 const std::string& verification_key,
2267 const std::string& seed,
2268 bool broadcast)
const;
2282 const std::string& proof,
2283 const std::string& vrf,
2285 bool broadcast)
const;
2302 std::vector<game_round_api_obj> lookup_game_round(int64_t from, uint32_t limit)
const;
2310 std::shared_ptr<detail::wallet_api_impl> my;
2317 std::map<public_key_type, std::string>
keys;
2340 (about)(is_new)(is_locked)(lock)(unlock)(set_password)
2341 (load_wallet_file)(save_wallet_file)(exit)
2348 (get_private_key_from_password)
2354 (get_block_headers_history)
2355 (get_blocks_history)
2358 (get_ops_history_by_time)
2364 (get_active_witnesses)
2370 (get_account_balance)
2371 (get_account_history)
2372 (get_account_scr_to_scr_transfers)
2373 (get_account_scr_to_sp_transfers)
2374 (get_account_sp_to_scr_transfers)
2375 (get_withdraw_routes)
2377 (get_encrypted_memo)
2380 (create_account_with_keys)
2381 (create_account_delegated)
2382 (create_account_with_keys_delegated)
2383 (create_account_by_committee)
2384 (create_account_by_committee_with_keys)
2386 (update_account_auth_key)
2387 (update_account_auth_account)
2388 (update_account_auth_threshold)
2389 (update_account_meta)
2390 (update_account_memo_key)
2391 (delegate_scorumpower)
2392 (delegate_scorumpower_from_reg_pool)
2401 (transfer_to_scorumpower)
2402 (withdraw_scorumpower)
2403 (set_withdraw_scorumpower_route)
2406 (set_transaction_expiration)
2409 (request_account_recovery)
2411 (change_recovery_account)
2413 (decline_voting_rights)
2416 (create_budget_for_post)
2417 (create_budget_for_banner)
2418 (update_budget_for_banner)
2419 (update_budget_for_post)
2420 (close_budget_for_post)
2421 (close_budget_for_banner)
2422 (close_budget_for_post_by_moderator)
2423 (close_budget_for_banner_by_moderator)
2425 (list_post_budget_owners)
2426 (list_banner_budget_owners)
2428 (get_banner_budgets)
2431 (vote_for_committee_proposal)
2432 (registration_committee_add_member)
2433 (registration_committee_exclude_member)
2434 (list_registration_committee)
2435 (registration_committee_change_add_member_quorum)
2436 (registration_committee_change_exclude_member_quorum)
2437 (registration_committee_change_base_quorum)
2438 (get_registration_committee)
2440 (get_devcommittee_history)
2441 (get_devcommittee_scr_to_scr_transfers)
2442 (get_devcommittee_sp_to_scr_transfers)
2445 (development_committee_add_member)
2446 (development_committee_exclude_member)
2447 (list_development_committee)
2448 (development_committee_change_add_member_quorum)
2449 (development_committee_change_exclude_member_quorum)
2450 (development_committee_change_base_quorum)
2451 (development_committee_change_transfer_quorum)
2452 (development_committee_change_budget_auction_properties_quorum)
2453 (development_committee_change_advertising_moderator_quorum)
2454 (development_committee_change_betting_moderator_quorum)
2455 (development_committee_empower_advertising_moderator)
2456 (development_committee_empower_betting_moderator)
2457 (development_committee_change_betting_resolve_delay)
2458 (get_development_committee)
2459 (development_pool_transfer)
2460 (development_pool_withdraw_vesting)
2461 (development_pool_post_budgets_auction_properties)
2462 (development_pool_banner_budgets_auction_properties)
2465 (atomicswap_initiate)
2466 (atomicswap_participate)
2468 (atomicswap_auditcontract)
2469 (atomicswap_extractsecret)
2471 (get_atomicswap_contracts)
2476 (update_game_markets)
2477 (update_game_start_time)
2480 (cancel_pending_bets)
2482 (get_games_by_status)
2483 (get_games_by_uuids)
2484 (lookup_games_by_id)
2485 (lookup_matched_bets)
2486 (lookup_pending_bets)
2489 (get_betting_properties)
2492 (get_game_matched_bets)
2493 (get_game_pending_bets)
2498 (adjust_nft_experience)
2506 (update_game_round_result)
2507 (get_game_round_by_uuid)
2511 (get_prototype_operation)
2512 (serialize_transaction)
2516 (network_get_connected_peers)
std::function< void()> exit_func_type
fc::signal< void(bool)> lock_changed
FC_REFLECT_ENUM(scorum::protocol::game_status,(created)(started)(finished)(resolved)(expired)(cancelled)) namespace fc
FC_REFLECT(appender_args,(appender)(stream)) FC_REFLECT_DERIVED(file_appender_args
fc::ripemd160 transaction_id_type
fc::static_variant< vote_operation, comment_operation, transfer_operation, transfer_to_scorumpower_operation, withdraw_scorumpower_operation, account_create_by_committee_operation, account_create_operation, account_create_with_delegation_operation, account_update_operation, witness_update_operation, account_witness_vote_operation, account_witness_proxy_operation, delete_comment_operation, comment_options_operation, set_withdraw_scorumpower_route_to_account_operation, set_withdraw_scorumpower_route_to_dev_pool_operation, prove_authority_operation, request_account_recovery_operation, recover_account_operation, change_recovery_account_operation, escrow_approve_operation, escrow_dispute_operation, escrow_release_operation, escrow_transfer_operation, decline_voting_rights_operation, delegate_scorumpower_operation, create_budget_operation, close_budget_operation, proposal_vote_operation, proposal_create_operation, atomicswap_initiate_operation, atomicswap_redeem_operation, atomicswap_refund_operation, close_budget_by_advertising_moderator_operation, update_budget_operation, create_game_operation, cancel_game_operation, update_game_markets_operation, update_game_start_time_operation, post_game_results_operation, post_bet_operation, cancel_pending_bets_operation, delegate_sp_from_reg_pool_operation, create_nft_operation, update_nft_meta_operation, create_game_round_operation, update_game_round_result_operation, adjust_nft_experience_operation, update_nft_name_operation, author_reward_operation, comment_benefficiary_reward_operation, comment_payout_update_operation, comment_reward_operation, curation_reward_operation, hardfork_operation, producer_reward_operation, active_sp_holders_reward_operation, return_scorumpower_delegation_operation, shutdown_witness_operation, witness_miss_block_operation, expired_contract_refund_operation, acc_finished_vesting_withdraw_operation, devpool_finished_vesting_withdraw_operation, acc_to_acc_vesting_withdraw_operation, devpool_to_acc_vesting_withdraw_operation, acc_to_devpool_vesting_withdraw_operation, devpool_to_devpool_vesting_withdraw_operation, proposal_virtual_operation, budget_outgo_operation, budget_owner_income_operation, active_sp_holders_reward_legacy_operation, budget_closing_operation, bets_matched_operation, game_status_changed_operation, bet_resolved_operation, bet_cancelled_operation, bet_restored_operation, bet_updated_operation > operation
fc::fixed_string_16 account_name_type
uint16_t authority_weight_type
fc::static_variant< result_home::yes, result_home::no, result_draw::yes, result_draw::no, result_away::yes, result_away::no, round_home::yes, round_home::no, handicap::over, handicap::under, correct_score_home::yes, correct_score_home::no, correct_score_draw::yes, correct_score_draw::no, correct_score_away::yes, correct_score_away::no, correct_score::yes, correct_score::no, goal_home::yes, goal_home::no, goal_both::yes, goal_both::no, goal_away::yes, goal_away::no, total::over, total::under, total_goals_home::over, total_goals_home::under, total_goals_away::over, total_goals_away::under > wincase_type
fc::static_variant< soccer_game, hockey_game > game_type
brain_key_info suggest_brain_key()
std::string normalize_brain_key(const std::string &s)
uint16_t transaction_handle_type
void check_memo(const std::string &memo, const account_object &account, const account_authority_object &auth)
boost::uuids::uuid uuid_type
static optional< memo_data > from_string(const std::string &str)
std::vector< char > encrypted
std::map< public_key_type, std::string > keys
std::vector< char > cipher_keys