BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
#include <wallet.hpp>
Public Member Functions | |
wallet_api (const wallet_data &initial_data, const fc::api< login_api > &rapi) | |
virtual | ~wallet_api () |
bool | copy_wallet_file (const string &destination_filename) const |
fc::ecc::private_key | derive_private_key (const string &prefix_string, uint32_t sequence_number) const |
variant | info () const |
variant_object | about () const |
optional< signed_block_with_info > | get_block (uint32_t num) const |
uint64_t | get_account_count () const |
vector< account_object > | list_my_accounts () const |
map< string, account_id_type, std::less<> > | list_accounts (const string &lowerbound, uint32_t limit) const |
vector< asset > | list_account_balances (const string &account_name_or_id) const |
vector< extended_asset_object > | list_assets (const string &lowerbound, uint32_t limit) const |
uint64_t | get_asset_count () const |
vector< operation_detail > | get_account_history (const string &account_name_or_id, uint32_t limit) const |
vector< operation_detail > | get_relative_account_history (const string &account_name_or_id, uint32_t stop, uint32_t limit, uint32_t start) const |
full_account | get_full_account (const string &name_or_id) const |
Fetch all objects relevant to the specified account. More... | |
vector< bucket_object > | get_market_history (const string &symbol, const string &symbol2, uint32_t bucket, const time_point_sec &start, const time_point_sec &end) const |
Get OHLCV data of a trading pair in a time range. More... | |
vector< limit_order_object > | get_account_limit_orders (const string &name_or_id, const string &base, const string "e, uint32_t limit=101, const optional< limit_order_id_type > &ostart_id={}, const optional< price > &ostart_price=optional< price >()) const |
Fetch all orders relevant to the specified account sorted descendingly by price. More... | |
vector< limit_order_object > | get_limit_orders (const string &a, const string &b, uint32_t limit) const |
Get limit orders in a given market. More... | |
vector< call_order_object > | get_call_orders (const string &asset_symbol_or_id, uint32_t limit) const |
Get call orders (aka margin positions) for a given asset. More... | |
vector< force_settlement_object > | get_settle_orders (const string &a, uint32_t limit) const |
Get forced settlement orders in a given asset. More... | |
vector< collateral_bid_object > | get_collateral_bids (const string &asset_symbol_or_id, uint32_t limit=100, uint32_t start=0) const |
global_property_object | get_global_properties () const |
account_history_operation_detail | get_account_history_by_operations (const string &account_name_or_id, const flat_set< uint16_t > &operation_types, uint32_t start, uint32_t limit) const |
dynamic_global_property_object | get_dynamic_global_properties () const |
account_object | get_account (const string &account_name_or_id) const |
extended_asset_object | get_asset (const string &asset_symbol_or_id) const |
asset_bitasset_data_object | get_bitasset_data (const string &asset_symbol_or_id) const |
optional< variant > | get_htlc (const htlc_id_type &htlc_id) const |
account_id_type | get_account_id (const string &account_name_or_id) const |
string | get_account_name (const string &account_name_or_id) const |
asset_id_type | get_asset_id (const string &asset_symbol_or_id) const |
string | get_asset_symbol (const string &asset_symbol_or_id) const |
string | get_asset_name (const string &asset_symbol_or_id) const |
variant | get_object (const object_id_type &id) const |
string | get_wallet_filename () const |
string | get_private_key (const public_key_type &pubkey) const |
transaction_handle_type | begin_builder_transaction () const |
void | add_operation_to_builder_transaction (transaction_handle_type transaction_handle, const operation &op) const |
void | replace_operation_in_builder_transaction (transaction_handle_type handle, uint32_t operation_index, const operation &new_op) const |
asset | set_fees_on_builder_transaction (transaction_handle_type handle, const string &fee_asset=GRAPHENE_SYMBOL) const |
transaction | preview_builder_transaction (transaction_handle_type handle) const |
signed_transaction | sign_builder_transaction (transaction_handle_type transaction_handle, bool broadcast=true) const |
signed_transaction | sign_builder_transaction2 (transaction_handle_type transaction_handle, const vector< public_key_type > &signing_keys=vector< public_key_type >(), bool broadcast=true) const |
pair< transaction_id_type, signed_transaction > | broadcast_transaction (const signed_transaction &tx) const |
signed_transaction | propose_builder_transaction (transaction_handle_type handle, const time_point_sec &expiration=time_point::now()+fc::minutes(1), uint32_t review_period_seconds=0, bool broadcast=true) const |
signed_transaction | propose_builder_transaction2 (transaction_handle_type handle, const string &account_name_or_id, const time_point_sec &expiration=time_point::now()+fc::minutes(1), uint32_t review_period_seconds=0, bool broadcast=true) const |
void | remove_builder_transaction (transaction_handle_type handle) const |
bool | is_new () const |
bool | is_locked () const |
void | lock () const |
void | unlock (const string &password) const |
void | set_password (const string &password) const |
map< public_key_type, string > | dump_private_keys () const |
string | help () const |
string | gethelp (const string &method) const |
bool | load_wallet_file (const string &wallet_filename="") const |
void | quit () const |
void | save_wallet_file (const string &wallet_filename="") const |
void | set_wallet_filename (const string &wallet_filename) const |
brain_key_info | suggest_brain_key () const |
vector< brain_key_info > | derive_owner_keys_from_brain_key (const string &brain_key, uint32_t number_of_desired_keys=1) const |
bool | is_public_key_registered (const string &public_key) const |
string | serialize_transaction (const signed_transaction &tx) const |
bool | import_key (const string &account_name_or_id, const string &wif_key) const |
map< string, bool, std::less<> > | import_accounts (const string &filename, const string &password) const |
bool | import_account_keys (const string &filename, const string &password, const string &src_account_name, const string &dest_account_name) const |
vector< signed_transaction > | import_balance (const string &account_name_or_id, const vector< string > &wif_keys, bool broadcast) const |
string | normalize_brain_key (const string &s) const |
signed_transaction | register_account (const string &name, const public_key_type &owner, const public_key_type &active, const string ®istrar_account, const string &referrer_account, uint32_t referrer_percent, bool broadcast=false) const |
signed_transaction | upgrade_account (const string &account_name_or_id, bool broadcast) const |
signed_transaction | create_account_with_brain_key (const string &brain_key, const string &account_name, const string ®istrar_account, const string &referrer_account, bool broadcast=false) const |
signed_transaction | transfer (const string &from, const string &to, const string &amount, const string &asset_symbol_or_id, const string &memo, bool broadcast=false) const |
pair< transaction_id_type, signed_transaction > | transfer2 (const string &from, const string &to, const string &amount, const string &asset_symbol_or_id, const string &memo) const |
transaction_id_type | get_transaction_id (const signed_transaction &trx) const |
memo_data | sign_memo (const string &from, const string &to, const string &memo) const |
string | read_memo (const memo_data &memo) const |
signed_message | sign_message (const string &signer, const string &message) const |
bool | verify_message (const string &message, const string &account, int32_t block, const string &msg_time, const fc::ecc::compact_signature &sig) const |
bool | verify_signed_message (const signed_message &message) const |
bool | verify_encapsulated_message (const string &message) const |
vector< blind_receipt > | blind_history (const string &key_or_account) const |
blind_receipt | receive_blind_transfer (const string &confirmation_receipt, const string &opt_from, const string &opt_memo) const |
blind_confirmation | transfer_to_blind (const string &from_account_name_or_id, const string &asset_symbol_or_id, const vector< pair< string, string >> &to_amounts, bool broadcast=false) const |
blind_confirmation | transfer_from_blind (const string &from_blind_account_key_or_label, const string &to_account_name_or_id, const string &amount, const string &asset_symbol_or_id, bool broadcast=false) const |
blind_confirmation | blind_transfer (const string &from_key_or_label, const string &to_key_or_label, const string &amount, const string &symbol_or_id, bool broadcast=false) const |
signed_transaction | sell_asset (const string &seller_account, const string &amount_to_sell, const string &symbol_or_id_to_sell, const string &min_to_receive, const string &symbol_or_id_to_receive, uint32_t timeout_sec=0, bool fill_or_kill=false, bool broadcast=false) const |
signed_transaction | borrow_asset (const string &borrower, const string &amount_to_borrow, const string &asset_symbol_or_id, const string &amount_of_collateral, bool broadcast=false) const |
signed_transaction | borrow_asset_ext (const string &borrower, const string &amount_to_borrow, const string &asset_symbol_or_id, const string &amount_of_collateral, const call_order_update_operation::extensions_type &extensions, bool broadcast=false) const |
signed_transaction | cancel_order (const limit_order_id_type &order_id, bool broadcast=false) const |
signed_transaction | create_asset (const string &issuer, const string &symbol, uint8_t precision, const asset_options &common, const optional< bitasset_options > &bitasset_opts, bool broadcast=false) const |
signed_transaction | issue_asset (const string &to_account, const string &amount, const string &symbol_or_id, const string &memo, bool broadcast=false) const |
signed_transaction | update_asset (const string &symbol_or_id, const optional< string > &new_issuer, const asset_options &new_options, bool broadcast=false) const |
signed_transaction | update_asset_issuer (const string &symbol_or_id, const string &new_issuer, bool broadcast=false) const |
signed_transaction | update_bitasset (const string &symbol_or_id, const bitasset_options &new_options, bool broadcast=false) const |
signed_transaction | update_asset_feed_producers (const string &symbol_or_id, const flat_set< string > &new_feed_producers, bool broadcast=false) const |
signed_transaction | publish_asset_feed (const string &publishing_account, const string &symbol_or_id, const price_feed &feed, bool broadcast=false) const |
signed_transaction | fund_asset_fee_pool (const string &from, const string &symbol_or_id, const string &amount, bool broadcast=false) const |
signed_transaction | claim_asset_fee_pool (const string &symbol_or_id, const string &amount, bool broadcast=false) const |
signed_transaction | reserve_asset (const string &from, const string &amount, const string &symbol_or_id, bool broadcast=false) const |
signed_transaction | global_settle_asset (const string &symbol_or_id, const price &settle_price, bool broadcast=false) const |
signed_transaction | settle_asset (const string &account_to_settle, const string &amount_to_settle, const string &symbol_or_id, bool broadcast=false) const |
signed_transaction | bid_collateral (const string &bidder, const string &debt_amount, const string &debt_symbol_or_id, const string &additional_collateral, bool broadcast=false) const |
signed_transaction | whitelist_account (const string &authorizing_account, const string &account_to_list, account_whitelist_operation::account_listing new_listing_status, bool broadcast=false) const |
signed_transaction | create_committee_member (const string &owner_account, const string &url, bool broadcast=false) const |
map< string, witness_id_type, std::less<> > | list_witnesses (const string &lowerbound, uint32_t limit) const |
map< string, committee_member_id_type, std::less<> > | list_committee_members (const string &lowerbound, uint32_t limit) const |
witness_object | get_witness (const string &owner_account) const |
committee_member_object | get_committee_member (const string &owner_account) const |
signed_transaction | create_witness (const string &owner_account, const string &url, bool broadcast=false) const |
signed_transaction | update_witness (const string &witness_name, const string &url, const string &block_signing_key, bool broadcast=false) const |
signed_transaction | create_worker (const string &owner_account, const time_point_sec &work_begin_date, const time_point_sec &work_end_date, const share_type &daily_pay, const string &name, const string &url, const variant &worker_settings, bool broadcast=false) const |
signed_transaction | update_worker_votes (const string &account, const worker_vote_delta &delta, bool broadcast=false) const |
signed_transaction | htlc_create (const string &source, const string &destination, const string &amount, const string &asset_symbol_or_id, const string &hash_algorithm, const string &preimage_hash, uint32_t preimage_size, uint32_t claim_period_seconds, const string &memo, bool broadcast=false) const |
signed_transaction | htlc_redeem (const htlc_id_type &htlc_id, const string &issuer, const string &preimage, bool broadcast=false) const |
signed_transaction | htlc_extend (const htlc_id_type &htlc_id, const string &issuer, uint32_t seconds_to_add, bool broadcast=false) const |
vector< vesting_balance_object_with_info > | get_vesting_balances (const string &account_name) const |
signed_transaction | withdraw_vesting (const string &witness_name, const string &amount, const string &asset_symbol_or_id, bool broadcast=false) const |
signed_transaction | vote_for_committee_member (const string &voting_account, const string &committee_member, bool approve, bool broadcast=false) const |
signed_transaction | vote_for_witness (const string &voting_account, const string &witness, bool approve, bool broadcast=false) const |
signed_transaction | set_voting_proxy (const string &account_to_modify, const optional< string > &voting_account, bool broadcast=false) const |
signed_transaction | set_desired_witness_and_committee_member_count (const string &account_to_modify, uint16_t desired_number_of_witnesses, uint16_t desired_number_of_committee_members, bool broadcast=false) const |
signed_transaction | sign_transaction (const signed_transaction &tx, bool broadcast=false) const |
signed_transaction | sign_transaction2 (const signed_transaction &tx, const vector< public_key_type > &signing_keys=vector< public_key_type >(), bool broadcast=true) const |
flat_set< public_key_type > | get_transaction_signers (const signed_transaction &tx) const |
vector< flat_set< account_id_type > > | get_key_references (const vector< public_key_type > &keys) const |
operation | get_prototype_operation (const string &operation_type) const |
signed_transaction | propose_parameter_change (const string &proposing_account, const time_point_sec &expiration_time, const variant_object &changed_values, bool broadcast=false) const |
signed_transaction | propose_fee_change (const string &proposing_account, const time_point_sec &expiration_time, const variant_object &changed_values, bool broadcast=false) const |
signed_transaction | approve_proposal (const string &fee_paying_account, const string &proposal_id, const approval_delta &delta, bool broadcast) const |
order_book | get_order_book (const string &base, const string "e, uint32_t limit=50) const |
signed_transaction | add_transaction_signature (const signed_transaction &tx, bool broadcast=false) const |
void | dbg_make_uia (const string &creator, const string &symbol) const |
void | dbg_make_mia (const string &creator, const string &symbol) const |
void | dbg_push_blocks (const string &src_filename, uint32_t count) const |
void | dbg_generate_blocks (const string &debug_wif_key, uint32_t count) const |
void | dbg_stream_json_objects (const string &filename) const |
void | dbg_update_object (const variant_object &update) const |
void | flood_network (const string &prefix, uint32_t number_of_transactions) const |
void | network_add_nodes (const vector< string > &nodes) const |
vector< variant > | network_get_connected_peers () const |
blind_confirmation | blind_transfer_help (const string &from_key_or_label, const string &to_key_or_label, const string &amount, const string &symbol, bool broadcast=false, bool to_temp=false) const |
std::map< string, std::function< string(const variant &, const fc::variants &) >, std::less<> > | get_result_formatters () const |
void | encrypt_keys () const |
signed_transaction | account_store_map (const string &account, const string &catalog, bool is_to_remove, const flat_map< string, optional< string >> &key_values, bool broadcast) const |
vector< account_storage_object > | get_account_storage (const string &account, const string &catalog) const |
bool | set_key_label (const public_key_type &key, const string &label) const |
string | get_key_label (const public_key_type &key) const |
public_key_type | create_blind_account (const string &label, const string &brain_key) const |
vector< asset > | get_blind_balances (const string &key_or_label) const |
map< string, public_key_type, std::less<> > | get_blind_accounts () const |
map< string, public_key_type, std::less<> > | get_my_blind_accounts () const |
public_key_type | get_public_key (const string &label) const |
Public Attributes | |
fc::signal< void(bool)> | lock_changed |
std::shared_ptr< detail::wallet_api_impl > | my |
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 50 of file wallet.hpp.
graphene::wallet::wallet_api::wallet_api | ( | const wallet_data & | initial_data, |
const fc::api< login_api > & | rapi | ||
) |
Definition at line 155 of file wallet.cpp.
|
virtualdefault |
variant_object graphene::wallet::wallet_api::about | ( | ) | const |
Returns info such as client version, git version of graphene/fc, version of boost, openssl.
Definition at line 758 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::account_store_map | ( | const string & | account, |
const string & | catalog, | ||
bool | is_to_remove, | ||
const flat_map< string, optional< string >> & | key_values, | ||
bool | broadcast | ||
) | const |
Manage account storage map(key->value) by using the custom operations plugin.
Each account can optionally add random information in the form of a key-value map to be retrieved by any interested party.
account | The account name or ID that we are adding additional information to. |
catalog | The name of the catalog the operation will insert data to. |
is_to_remove | true if you want to remove stuff from a catalog. |
key_values | The map to be inserted/removed to/from the catalog |
broadcast | true if you wish to broadcast the transaction |
Definition at line 1931 of file wallet.cpp.
void graphene::wallet::wallet_api::add_operation_to_builder_transaction | ( | transaction_handle_type | transaction_handle, |
const operation & | op | ||
) | const |
Append a new operation to a transaction builder.
transaction_handle | handle of the transaction builder |
op | the operation in JSON format |
Definition at line 510 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::add_transaction_signature | ( | const signed_transaction & | tx, |
bool | broadcast = false |
||
) | const |
Signs a transaction.
Given a fully-formed transaction with or without signatures, signs the transaction with the owned keys and optionally broadcasts the transaction.
tx | the transaction to add signature to |
broadcast | true if you wish to broadcast the transaction |
Definition at line 1132 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::approve_proposal | ( | const string & | fee_paying_account, |
const string & | proposal_id, | ||
const approval_delta & | delta, | ||
bool | broadcast | ||
) | const |
Approve or disapprove a proposal.
fee_paying_account | The account paying the fee for the op. |
proposal_id | The proposal to modify. |
delta | Members contain approvals to create or remove. In JSON you can leave empty members undefined. |
broadcast | true if you wish to broadcast the transaction |
Definition at line 1112 of file wallet.cpp.
transaction_handle_type graphene::wallet::wallet_api::begin_builder_transaction | ( | ) | const |
Create a new transaction builder.
Definition at line 505 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::bid_collateral | ( | const string & | bidder, |
const string & | debt_amount, | ||
const string & | debt_symbol_or_id, | ||
const string & | additional_collateral, | ||
bool | broadcast = false |
||
) | const |
Creates or updates a bid on an MPA after global settlement.
In order to revive a market-pegged asset after global settlement (aka black swan), investors can bid collateral in order to take over part of the debt and the settlement fund, see BSIP-0018. Updating an existing bid to cover 0 debt will delete the bid.
bidder | the name or id of the account making the bid |
debt_amount | the amount of debt of the named asset to bid for |
debt_symbol_or_id | the symbol or id of the MPA to bid for |
additional_collateral | the amount of additional collateral to bid for taking over debt_amount. The asset type of this amount is determined automatically from debt_symbol_or_id . |
broadcast | true to broadcast the transaction on the network |
Definition at line 885 of file wallet.cpp.
vector< blind_receipt > graphene::wallet::wallet_api::blind_history | ( | const string & | key_or_account | ) | const |
Get all blind receipts to/form a particular account
key_or_account | a public key in Base58 format or an account |
Definition at line 1907 of file wallet.cpp.
blind_confirmation graphene::wallet::wallet_api::blind_transfer | ( | const string & | from_key_or_label, |
const string & | to_key_or_label, | ||
const string & | amount, | ||
const string & | symbol_or_id, | ||
bool | broadcast = false |
||
) | const |
Transfer from one set of blinded balances to another.
from_key_or_label | a public key in Base58 format or a label to transfer from |
to_key_or_label | a public key in Base58 format or a label to transfer to |
amount | the amount to be transferred |
symbol_or_id | symbol or ID of the asset to be transferred |
broadcast | true to broadcast the transaction on the network |
Definition at line 1556 of file wallet.cpp.
blind_confirmation graphene::wallet::wallet_api::blind_transfer_help | ( | const string & | from_key_or_label, |
const string & | to_key_or_label, | ||
const string & | amount, | ||
const string & | symbol, | ||
bool | broadcast = false , |
||
bool | to_temp = false |
||
) | const |
Used to transfer from one set of blinded balances to another
commitments must be in sorted order
Definition at line 1564 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::borrow_asset | ( | const string & | borrower, |
const string & | amount_to_borrow, | ||
const string & | asset_symbol_or_id, | ||
const string & | amount_of_collateral, | ||
bool | broadcast = false |
||
) | const |
Borrow an asset or update the debt/collateral ratio for the loan.
This is the first step in shorting an asset. Call sell_asset()
to complete the short.
borrower | the name or id of the account associated with the transaction. |
amount_to_borrow | the amount of the asset being borrowed. Make this value negative to pay back debt. |
asset_symbol_or_id | the symbol or id of the asset being borrowed. |
amount_of_collateral | the amount of the backing asset to add to your collateral position. Make this negative to claim back some of your collateral. The backing asset is defined in the bitasset_options for the asset being borrowed. |
broadcast | true to broadcast the transaction on the network |
Definition at line 1317 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::borrow_asset_ext | ( | const string & | borrower, |
const string & | amount_to_borrow, | ||
const string & | asset_symbol_or_id, | ||
const string & | amount_of_collateral, | ||
const call_order_update_operation::extensions_type & | extensions, | ||
bool | broadcast = false |
||
) | const |
Borrow an asset or update the debt/collateral ratio for the loan, with additional options.
This is the first step in shorting an asset. Call sell_asset()
to complete the short.
borrower | the name or id of the account associated with the transaction. |
amount_to_borrow | the amount of the asset being borrowed. Make this value negative to pay back debt. |
asset_symbol_or_id | the symbol or id of the asset being borrowed. |
amount_of_collateral | the amount of the backing asset to add to your collateral position. Make this negative to claim back some of your collateral. The backing asset is defined in the bitasset_options for the asset being borrowed. |
extensions | additional options |
broadcast | true to broadcast the transaction on the network |
Definition at line 1325 of file wallet.cpp.
pair< transaction_id_type, signed_transaction > graphene::wallet::wallet_api::broadcast_transaction | ( | const signed_transaction & | tx | ) | const |
Broadcast signed transaction
tx | signed transaction |
Definition at line 548 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::cancel_order | ( | const limit_order_id_type & | order_id, |
bool | broadcast = false |
||
) | const |
Cancel an existing order
order_id | the id of order to be cancelled |
broadcast | true to broadcast the transaction on the network |
Definition at line 1335 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::claim_asset_fee_pool | ( | const string & | symbol_or_id, |
const string & | amount, | ||
bool | broadcast = false |
||
) | const |
Claim funds from the fee pool for the given asset.
User-issued assets can optionally have a pool of the core asset which is automatically used to pay transaction fees for any transaction using that asset (using the asset's core exchange rate).
This command allows the issuer to withdraw those funds from the fee pool.
symbol_or_id | the symbol or id of the asset whose fee pool you wish to claim |
amount | the amount of the core asset to withdraw |
broadcast | true to broadcast the transaction on the network |
Definition at line 855 of file wallet.cpp.
bool graphene::wallet::wallet_api::copy_wallet_file | ( | const string & | destination_filename | ) | const |
Definition at line 162 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::create_account_with_brain_key | ( | const string & | brain_key, |
const string & | account_name, | ||
const string & | registrar_account, | ||
const string & | referrer_account, | ||
bool | broadcast = false |
||
) | const |
Creates a new account and registers it on the blockchain.
brain_key | the brain key used for generating the account's private keys |
account_name | the name of the account, must be unique on the blockchain. Names with only latin letters and at least one vowel are premium names and expensive to register. Names with only consonants, or at least with a digit, a dot or a minus sign are cheap. |
registrar_account | the account which will pay the fee to register the user |
referrer_account | the account who is acting as a referrer, and may receive a portion of the user's transaction fees. This can be the same as the registrar_account if there is no referrer. |
broadcast | true to broadcast the transaction on the network |
Definition at line 779 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::create_asset | ( | const string & | issuer, |
const string & | symbol, | ||
uint8_t | precision, | ||
const asset_options & | common, | ||
const optional< bitasset_options > & | bitasset_opts, | ||
bool | broadcast = false |
||
) | const |
Creates a new user-issued or market-issued asset.
Many options can be changed later using update_asset()
Right now this function is difficult to use because you must provide raw JSON data structures for the options objects, and those include prices and asset ids.
issuer | the name or id of the account who will pay the fee and become the issuer of the new asset. This can be updated later |
symbol | the ticker symbol of the new asset |
precision | the number of digits of precision to the right of the decimal point, must be less than or equal to 12 |
common | asset options required for all new assets. Note that core_exchange_rate technically needs to store the asset ID of this new asset. Since this ID is not known at the time this operation is created, create this price as though the new asset has instance ID 1, and the chain will overwrite it with the new asset's ID. |
bitasset_opts | options specific to BitAssets. This may be null unless the market_issued flag is set in common.flags |
broadcast | true to broadcast the transaction on the network |
Definition at line 800 of file wallet.cpp.
public_key_type graphene::wallet::wallet_api::create_blind_account | ( | const string & | label, |
const string & | brain_key | ||
) | const |
Generates a new blind account for the given brain key and assigns it the given label.
label | a label |
brain_key | the brain key to be used to generate a new blind account |
Definition at line 1442 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::create_committee_member | ( | const string & | owner_account, |
const string & | url, | ||
bool | broadcast = false |
||
) | const |
Creates a committee_member object owned by the given account.
An account can have at most one committee_member object.
owner_account | the name or id of the account which is creating the committee_member |
url | a URL to include in the committee_member record in the blockchain. Clients may display this when showing a list of committee_members. May be blank. |
broadcast | true to broadcast the transaction on the network |
Definition at line 901 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::create_witness | ( | const string & | owner_account, |
const string & | url, | ||
bool | broadcast = false |
||
) | const |
Creates a witness object owned by the given account.
An account can have at most one witness object.
owner_account | the name or id of the account which is creating the witness |
url | a URL to include in the witness record in the blockchain. Clients may display this when showing a list of witnesses. May be blank. |
broadcast | true to broadcast the transaction on the network |
Definition at line 928 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::create_worker | ( | const string & | owner_account, |
const time_point_sec & | work_begin_date, | ||
const time_point_sec & | work_end_date, | ||
const share_type & | daily_pay, | ||
const string & | name, | ||
const string & | url, | ||
const variant & | worker_settings, | ||
bool | broadcast = false |
||
) | const |
Create a worker object.
owner_account | The account which owns the worker and will be paid |
work_begin_date | When the work begins |
work_end_date | When the work ends |
daily_pay | Amount of pay per day (NOT per maint interval) |
name | Any text |
url | Any text |
worker_settings | {"type" : "burn"|"refund"|"vesting", "pay_vesting_period_days" : x} |
broadcast | true if you wish to broadcast the transaction. |
Definition at line 935 of file wallet.cpp.
void graphene::wallet::wallet_api::dbg_generate_blocks | ( | const string & | debug_wif_key, |
uint32_t | count | ||
) | const |
Definition at line 1061 of file wallet.cpp.
void graphene::wallet::wallet_api::dbg_make_mia | ( | const string & | creator, |
const string & | symbol | ||
) | const |
Definition at line 1050 of file wallet.cpp.
void graphene::wallet::wallet_api::dbg_make_uia | ( | const string & | creator, |
const string & | symbol | ||
) | const |
Definition at line 1044 of file wallet.cpp.
void graphene::wallet::wallet_api::dbg_push_blocks | ( | const string & | src_filename, |
uint32_t | count | ||
) | const |
Definition at line 1056 of file wallet.cpp.
void graphene::wallet::wallet_api::dbg_stream_json_objects | ( | const string & | filename | ) | const |
Definition at line 1066 of file wallet.cpp.
void graphene::wallet::wallet_api::dbg_update_object | ( | const variant_object & | update | ) | const |
Definition at line 1071 of file wallet.cpp.
vector< brain_key_info > graphene::wallet::wallet_api::derive_owner_keys_from_brain_key | ( | const string & | brain_key, |
uint32_t | number_of_desired_keys = 1 |
||
) | const |
Derive any number of possible owner keys from a given brain key.
NOTE: These keys may or may not match with the owner keys of any account. This function is merely intended to assist with account or key recovery.
brain_key | Brain key |
number_of_desired_keys | Number of desired keys |
Definition at line 476 of file wallet.cpp.
fc::ecc::private_key graphene::wallet::wallet_api::derive_private_key | ( | const string & | prefix_string, |
uint32_t | sequence_number | ||
) | const |
Definition at line 763 of file wallet.cpp.
map< public_key_type, string > graphene::wallet::wallet_api::dump_private_keys | ( | ) | const |
Dumps all private keys owned by the wallet.
The keys are printed in WIF format. You can import these keys into another wallet using import_key()
Definition at line 1293 of file wallet.cpp.
void graphene::wallet::wallet_api::encrypt_keys | ( | ) | const |
Definition at line 1249 of file wallet.cpp.
void graphene::wallet::wallet_api::flood_network | ( | const string & | prefix, |
uint32_t | number_of_transactions | ||
) | const |
Definition at line 1086 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::fund_asset_fee_pool | ( | const string & | from, |
const string & | symbol_or_id, | ||
const string & | amount, | ||
bool | broadcast = false |
||
) | const |
Pay into the fee pool for the given asset.
User-issued assets can optionally have a pool of the core asset which is automatically used to pay transaction fees for any transaction using that asset (using the asset's core exchange rate).
This command allows anyone to deposit the core asset into this fee pool.
from | the name or id of the account sending the core asset |
symbol_or_id | the symbol or id of the asset whose fee pool you wish to fund |
amount | the amount of the core asset to deposit |
broadcast | true to broadcast the transaction on the network |
Definition at line 847 of file wallet.cpp.
account_object graphene::wallet::wallet_api::get_account | ( | const string & | account_name_or_id | ) | const |
Returns information about the given account.
account_name_or_id | the name or ID of the account to provide information about |
Definition at line 577 of file wallet.cpp.
uint64_t graphene::wallet::wallet_api::get_account_count | ( | ) | const |
Returns the number of accounts registered on the blockchain
Definition at line 172 of file wallet.cpp.
vector< operation_detail > graphene::wallet::wallet_api::get_account_history | ( | const string & | account_name_or_id, |
uint32_t | limit | ||
) | const |
Returns the most recent operations on the named account.
This returns a list of operation history objects, which describe activity on the account.
account_name_or_id | the name or id of the account |
limit | the number of entries to return (starting from the most recent) |
operation_history_objects
Definition at line 280 of file wallet.cpp.
account_history_operation_detail graphene::wallet::wallet_api::get_account_history_by_operations | ( | const string & | account_name_or_id, |
const flat_set< uint16_t > & | operation_types, | ||
uint32_t | start, | ||
uint32_t | limit | ||
) | const |
Get operations relevant to the specified account filtering by operation type, with transaction id
account_name_or_id | the name or id of the account, whose history shoulde be queried |
operation_types | The IDs of the operation we want to get operations in the account ( 0 = transfer , 1 = limit order create, ...) |
start | the sequence number where to start looping back throw the history |
limit | the max number of entries to return (from start number) |
Definition at line 378 of file wallet.cpp.
account_id_type graphene::wallet::wallet_api::get_account_id | ( | const string & | account_name_or_id | ) | const |
Lookup the id of a named account.
account_name_or_id | the name or ID of the account to look up |
Definition at line 596 of file wallet.cpp.
vector< limit_order_object > graphene::wallet::wallet_api::get_account_limit_orders | ( | const string & | name_or_id, |
const string & | base, | ||
const string & | quote, | ||
uint32_t | limit = 101 , |
||
const optional< limit_order_id_type > & | ostart_id = {} , |
||
const optional< price > & | ostart_price = optional<price>() |
||
) | const |
Fetch all orders relevant to the specified account sorted descendingly by price.
name_or_id | The name or ID of an account to retrieve |
base | Base asset |
quote | Quote asset |
limit | The limitation of items each query can fetch (max: 101) |
ostart_id | Start order id, fetch orders which price are lower than or equal to this order |
ostart_price | Fetch orders with price lower than or equal to this price |
name_or_id
to the corresponding accountname_or_id
cannot be tied to an account, empty result will be returnedostart_id
and ostart_price
can be null
, if so the api will return the "first page" of orders. if ostart_id
is specified and valid, its price will be used to do page query preferentially, otherwise the ostart_price
will be used Definition at line 440 of file wallet.cpp.
|
inline |
Lookup the name of an account.
account_name_or_id | the name or ID of the account to look up |
Definition at line 299 of file wallet.hpp.
vector< account_storage_object > graphene::wallet::wallet_api::get_account_storage | ( | const string & | account, |
const string & | catalog | ||
) | const |
Get account_storage_object
of an account by using the custom operations plugin.
Storage data added to the map with account_store_map will be returned.
account | Account name or ID to get stored data from. |
catalog | The catalog to retrieve. |
account_storage_object
or empty. Definition at line 1937 of file wallet.cpp.
extended_asset_object graphene::wallet::wallet_api::get_asset | ( | const string & | asset_symbol_or_id | ) | const |
Returns information about the given asset.
asset_symbol_or_id | the symbol or id of the asset in question |
Definition at line 582 of file wallet.cpp.
uint64_t graphene::wallet::wallet_api::get_asset_count | ( | ) | const |
Returns assets count registered on the blockchain.
Definition at line 197 of file wallet.cpp.
asset_id_type graphene::wallet::wallet_api::get_asset_id | ( | const string & | asset_symbol_or_id | ) | const |
Lookup the id of an asset.
asset_symbol_or_id | the symbol or ID of an asset to look up |
Definition at line 601 of file wallet.cpp.
|
inline |
Lookup the symbol of an asset. Synonym of get_asset_symbol.
asset_symbol_or_id | the symbol or ID of an asset to look up |
Definition at line 322 of file wallet.hpp.
|
inline |
Lookup the symbol of an asset.
asset_symbol_or_id | the symbol or ID of an asset to look up |
Definition at line 314 of file wallet.hpp.
asset_bitasset_data_object graphene::wallet::wallet_api::get_bitasset_data | ( | const string & | asset_symbol_or_id | ) | const |
Returns the BitAsset-specific data for a given asset. Market-issued assets's behavior are determined both by their "BitAsset Data" and their basic asset data, as returned by get_asset()
.
asset_symbol_or_id | the symbol or id of the BitAsset in question |
Definition at line 589 of file wallet.cpp.
map< string, public_key_type, std::less<> > graphene::wallet::wallet_api::get_blind_accounts | ( | ) | const |
vector< asset > graphene::wallet::wallet_api::get_blind_balances | ( | const string & | key_or_label | ) | const |
Return the total balances of all blinded commitments that can be claimed by the given account key or label.
key_or_label | a public key in Base58 format or a label |
Definition at line 1462 of file wallet.cpp.
optional< signed_block_with_info > graphene::wallet::wallet_api::get_block | ( | uint32_t | num | ) | const |
Returns info about a specified block.
num | height of the block to retrieve |
Definition at line 167 of file wallet.cpp.
vector< call_order_object > graphene::wallet::wallet_api::get_call_orders | ( | const string & | asset_symbol_or_id, |
uint32_t | limit | ||
) | const |
Get call orders (aka margin positions) for a given asset.
asset_symbol_or_id | symbol or ID of the debt asset |
limit | Maximum number of orders to retrieve |
Definition at line 456 of file wallet.cpp.
vector< collateral_bid_object > graphene::wallet::wallet_api::get_collateral_bids | ( | const string & | asset_symbol_or_id, |
uint32_t | limit = 100 , |
||
uint32_t | start = 0 |
||
) | const |
Returns the collateral_bid object for the given MPA
asset_symbol_or_id | the symbol or id of the asset |
limit | the number of entries to return |
start | the sequence number where to start looping back throw the history |
collateral_bid_objects
Definition at line 466 of file wallet.cpp.
committee_member_object graphene::wallet::wallet_api::get_committee_member | ( | const string & | owner_account | ) | const |
Returns information about the given committee_member.
owner_account | the name or id of the committee_member account owner, or the id of the committee_member |
Definition at line 923 of file wallet.cpp.
dynamic_global_property_object graphene::wallet::wallet_api::get_dynamic_global_properties | ( | ) | const |
Returns the block chain's rapidly-changing properties. The returned object contains information that changes every block interval such as the head block number, the next witness, etc.
get_global_properties()
for less-frequently changing properties Definition at line 1127 of file wallet.cpp.
full_account graphene::wallet::wallet_api::get_full_account | ( | const string & | name_or_id | ) | const |
Fetch all objects relevant to the specified account.
name_or_id | Must be the name or ID of an account to retrieve |
This function fetches all relevant objects for the given account. If the string of name_or_id
cannot be tied to an account, that input will be ignored.
Definition at line 425 of file wallet.cpp.
global_property_object graphene::wallet::wallet_api::get_global_properties | ( | ) | const |
Returns the block chain's slowly-changing settings. This object contains all of the properties of the blockchain that are fixed or that change only once per maintenance interval (daily) such as the current list of witnesses, committee_members, block interval, etc.
get_dynamic_global_properties()
for frequently changing properties Definition at line 1122 of file wallet.cpp.
fc::optional< fc::variant > graphene::wallet::wallet_api::get_htlc | ( | const htlc_id_type & | htlc_id | ) | const |
Returns information about the given HTLC object.
htlc_id | the id of the HTLC object. |
Definition at line 211 of file wallet.cpp.
string graphene::wallet::wallet_api::get_key_label | ( | const public_key_type & | key | ) | const |
Get label of a public key.
key | a public key |
set_key_label()
, or an empty string if not set Definition at line 1386 of file wallet.cpp.
vector< flat_set< account_id_type > > graphene::wallet::wallet_api::get_key_references | ( | const vector< public_key_type > & | keys | ) | const |
Get key references.
Returns accounts related to given public keys.
keys | public keys to search for related accounts |
Definition at line 1034 of file wallet.cpp.
vector< limit_order_object > graphene::wallet::wallet_api::get_limit_orders | ( | const string & | a, |
const string & | b, | ||
uint32_t | limit | ||
) | const |
Get limit orders in a given market.
a | symbol or ID of asset being sold |
b | symbol or ID of asset being purchased |
limit | Maximum number of orders to retrieve |
Definition at line 451 of file wallet.cpp.
vector< bucket_object > graphene::wallet::wallet_api::get_market_history | ( | const string & | symbol, |
const string & | symbol2, | ||
uint32_t | bucket, | ||
const time_point_sec & | start, | ||
const time_point_sec & | end | ||
) | const |
Get OHLCV data of a trading pair in a time range.
symbol | symbol or ID of the base asset |
symbol2 | symbol or ID of the quote asset |
bucket | length of each time bucket in seconds. |
start | the start of a time range, E.G. "2018-01-01T00:00:00" |
end | the end of the time range |
Definition at line 430 of file wallet.cpp.
map< string, public_key_type, std::less<> > graphene::wallet::wallet_api::get_my_blind_accounts | ( | ) | const |
Get all blind accounts for which this wallet has the private key.
Definition at line 1430 of file wallet.cpp.
variant graphene::wallet::wallet_api::get_object | ( | const object_id_type & | id | ) | const |
Returns the blockchain object corresponding to the given id.
This generic function can be used to retrieve any object from the blockchain that is assigned an ID. Certain types of objects have specialized convenience functions to return their objects – e.g., assets have get_asset()
, accounts have get_account()
, but this function will work for any object.
id | the id of the object to return |
Definition at line 495 of file wallet.cpp.
order_book graphene::wallet::wallet_api::get_order_book | ( | const string & | base, |
const string & | quote, | ||
uint32_t | limit = 50 |
||
) | const |
Returns the order book for the market base:quote.
base | symbol or ID of the base asset |
quote | symbol or ID of the quote asset |
limit | depth of the order book to retrieve, for bids and asks each, capped at 50 |
Definition at line 1925 of file wallet.cpp.
string graphene::wallet::wallet_api::get_private_key | ( | const public_key_type & | pubkey | ) | const |
Get the WIF private key corresponding to a public key. The private key must already be in the wallet.
pubkey | a public key in Base58 format |
Definition at line 1394 of file wallet.cpp.
operation graphene::wallet::wallet_api::get_prototype_operation | ( | const string & | operation_type | ) | const |
Returns an uninitialized object representing a given blockchain operation.
This returns a default-initialized object of the given type. It can be used during early development of the wallet when we don't yet have custom commands for creating all of the operations the blockchain supports.
Any operation the blockchain supports can be created using the transaction builder's add_operation_to_builder_transaction()
, but to do that from the CLI you need to know what the JSON form of the operation looks like. This will give you a template you can fill in. It's better than nothing.
operation_type | the type of operation to return, must be one of the operations defined in graphene/protocol/operations.hpp (e.g., "global_parameters_update_operation") |
Definition at line 1039 of file wallet.cpp.
public_key_type graphene::wallet::wallet_api::get_public_key | ( | const string & | label | ) | const |
Get the public key associated with a given label.
label | a label |
Definition at line 1399 of file wallet.cpp.
vector< operation_detail > graphene::wallet::wallet_api::get_relative_account_history | ( | const string & | account_name_or_id, |
uint32_t | stop, | ||
uint32_t | limit, | ||
uint32_t | start | ||
) | const |
Returns the relative operations on the named account from start number.
account_name_or_id | the name or id of the account |
stop | Sequence number of earliest operation. |
limit | the number of entries to return |
start | the sequence number where to start looping back throw the history |
operation_history_objects
Definition at line 338 of file wallet.cpp.
std::map< string, std::function< string(const fc::variant &, const fc::variants &) >, std::less<> > graphene::wallet::wallet_api::get_result_formatters | ( | ) | const |
Definition at line 1235 of file wallet.cpp.
vector< force_settlement_object > graphene::wallet::wallet_api::get_settle_orders | ( | const string & | a, |
uint32_t | limit | ||
) | const |
Get forced settlement orders in a given asset.
a | Symbol or ID of asset being settled |
limit | Maximum number of orders to retrieve |
Definition at line 461 of file wallet.cpp.
|
inline |
This method is used to convert a JSON transaction to its transactin ID.
trx | a JSON transaction |
Definition at line 808 of file wallet.hpp.
flat_set< public_key_type > graphene::wallet::wallet_api::get_transaction_signers | ( | const signed_transaction & | tx | ) | const |
Get transaction signers.
Returns information about who signed the transaction, specifically, the corresponding public keys of the private keys used to sign the transaction.
tx | the signed transaction |
Definition at line 1029 of file wallet.cpp.
vector< vesting_balance_object_with_info > graphene::wallet::wallet_api::get_vesting_balances | ( | const string & | account_name | ) | const |
Get information about a vesting balance object or vesting balance objects owned by an account.
account_name | An account name, account ID, or vesting balance object ID. |
Definition at line 966 of file wallet.cpp.
string graphene::wallet::wallet_api::get_wallet_filename | ( | ) | const |
Returns the current wallet filename.
This is the filename that will be used when automatically saving the wallet.
Definition at line 500 of file wallet.cpp.
witness_object graphene::wallet::wallet_api::get_witness | ( | const string & | owner_account | ) | const |
Returns information about the given witness.
owner_account | the name or id of the witness account owner, or the id of the witness |
Definition at line 918 of file wallet.cpp.
string graphene::wallet::wallet_api::gethelp | ( | const string & | method | ) | const |
Returns detailed help on a single API command.
method | the name of the API command you want help with |
Definition at line 1156 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::global_settle_asset | ( | const string & | symbol_or_id, |
const price & | settle_price, | ||
bool | broadcast = false |
||
) | const |
Forces a global settling of the given asset (black swan or prediction markets).
In order to use this operation, asset_to_settle must have the global_settle
permission set
When this operation is executed all open margin positions are called at the settle price. A pool will be formed containing the collateral got from the margin positions. Users owning an amount of the asset may use settle_asset()
to claim collateral instantly at the settle price from the pool. If this asset is used as backing for other bitassets, those bitassets will not be affected.
symbol_or_id | the symbol or id of the asset to globally settle |
settle_price | the price at which to settle |
broadcast | true to broadcast the transaction on the network |
Definition at line 870 of file wallet.cpp.
string graphene::wallet::wallet_api::help | ( | ) | const |
Returns a list of all commands supported by the wallet API.
This lists each command, along with its arguments and return types. For more detailed help on a single command, use gethelp()
Definition at line 1138 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::htlc_create | ( | const string & | source, |
const string & | destination, | ||
const string & | amount, | ||
const string & | asset_symbol_or_id, | ||
const string & | hash_algorithm, | ||
const string & | preimage_hash, | ||
uint32_t | preimage_size, | ||
uint32_t | claim_period_seconds, | ||
const string & | memo, | ||
bool | broadcast = false |
||
) | const |
Create a hashed time lock contract
source | The account that will reserve the funds (and pay the fee) |
destination | The account that will receive the funds if the preimage is presented |
amount | the amount of the asset that is to be traded |
asset_symbol_or_id | The asset that is to be traded |
hash_algorithm | the algorithm used to generate the hash from the preimage. Can be RIPEMD160 or SHA256. |
preimage_hash | the hash of the preimage |
preimage_size | the size of the preimage in bytes |
claim_period_seconds | how long after creation until the lock expires |
memo | the memo |
broadcast | true if you wish to broadcast the transaction |
Definition at line 202 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::htlc_extend | ( | const htlc_id_type & | htlc_id, |
const string & | issuer, | ||
uint32_t | seconds_to_add, | ||
bool | broadcast = false |
||
) | const |
Definition at line 274 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::htlc_redeem | ( | const htlc_id_type & | htlc_id, |
const string & | issuer, | ||
const string & | preimage, | ||
bool | broadcast = false |
||
) | const |
Definition at line 267 of file wallet.cpp.
bool graphene::wallet::wallet_api::import_account_keys | ( | const string & | filename, |
const string & | password, | ||
const string & | src_account_name, | ||
const string & | dest_account_name | ||
) | const |
Imports from a BitShares 0.x wallet file, find keys that were bound to a given account name on the BitShares 0.x chain, rebind them to an account name on the 2.0 chain. Current wallet file must be unlocked to perform the import.
filename | the BitShares 0.x wallet file to import |
password | the password to encrypt the BitShares 0.x wallet file |
src_account_name | name of the account on BitShares 0.x chain |
dest_account_name | name of the account on BitShares 2.0 chain, can be same or different to src_account_name |
Definition at line 697 of file wallet.cpp.
map< string, bool, std::less<> > graphene::wallet::wallet_api::import_accounts | ( | const string & | filename, |
const string & | password | ||
) | const |
Imports accounts from a BitShares 0.x wallet file. Current wallet file must be unlocked to perform the import.
filename | the BitShares 0.x wallet file to import |
password | the password to encrypt the BitShares 0.x wallet file |
Definition at line 625 of file wallet.cpp.
vector< signed_transaction > graphene::wallet::wallet_api::import_balance | ( | const string & | account_name_or_id, |
const vector< string > & | wif_keys, | ||
bool | broadcast | ||
) | const |
This call will construct transaction(s) that will claim all balances controled by wif_keys and deposit them into the given account.
account_name_or_id | name or ID of an account that to claim balances to |
wif_keys | private WIF keys of balance objects to claim balances from |
broadcast | true to broadcast the transaction on the network |
Definition at line 1285 of file wallet.cpp.
bool graphene::wallet::wallet_api::import_key | ( | const string & | account_name_or_id, |
const string & | wif_key | ||
) | const |
Imports the private key for an existing account.
The private key must match either an owner key or an active key for the named account.
account_name_or_id | the account owning the key |
wif_key | the private key in WIF format |
Definition at line 606 of file wallet.cpp.
variant graphene::wallet::wallet_api::info | ( | ) | const |
Returns info about head block, chain_id, maintenance, participation, current active witnesses and committee members.
Definition at line 753 of file wallet.cpp.
bool graphene::wallet::wallet_api::is_locked | ( | ) | const |
Checks whether the wallet is locked (is unable to use its private keys).
This state can be changed by calling lock()
or unlock()
.
Definition at line 1240 of file wallet.cpp.
bool graphene::wallet::wallet_api::is_new | ( | ) | const |
Checks whether the wallet has just been created and has not yet had a password set.
Calling set_password
will transition the wallet to the locked state.
Definition at line 1244 of file wallet.cpp.
bool graphene::wallet::wallet_api::is_public_key_registered | ( | const string & | public_key | ) | const |
Determine whether a textual representation of a public key (in Base-58 format) is currently linked to any registered (i.e. non-stealth) account on the blockchain
public_key | Public key |
Definition at line 483 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::issue_asset | ( | const string & | to_account, |
const string & | amount, | ||
const string & | symbol_or_id, | ||
const string & | memo, | ||
bool | broadcast = false |
||
) | const |
Create the specified amount of the specified asset and credit into the specified account.
to_account | the name or id of the account to receive the new supply |
amount | the amount to issue, in nominal units |
symbol_or_id | the ticker symbol or id of the asset to issue |
memo | a memo to include in the transaction, readable by the recipient |
broadcast | true to broadcast the transaction on the network |
Definition at line 788 of file wallet.cpp.
vector< asset > graphene::wallet::wallet_api::list_account_balances | ( | const string & | account_name_or_id | ) | const |
List the balances of an account. Each account can have multiple balances, one for each type of asset owned by that account. The returned list will only contain assets for which the account has a nonzero balance
account_name_or_id | the name or id of the account whose balances you want |
Definition at line 187 of file wallet.cpp.
map< string, account_id_type, std::less<> > graphene::wallet::wallet_api::list_accounts | ( | const string & | lowerbound, |
uint32_t | limit | ||
) | const |
Lists all accounts registered in the blockchain. This returns a list of all account names and their account ids, sorted by account name.
Use the lowerbound
and limit parameters to page through the list. To retrieve all accounts, start by setting lowerbound
to the empty string ""
, and then each iteration, pass the last account name returned as the lowerbound
for the next list_accounts()
call.
lowerbound | the name of the first account to return. If the named account does not exist, the list will start at the account that comes after lowerbound |
limit | the maximum number of accounts to return (max: 1000) |
Definition at line 182 of file wallet.cpp.
vector< extended_asset_object > graphene::wallet::wallet_api::list_assets | ( | const string & | lowerbound, |
uint32_t | limit | ||
) | const |
Lists all assets registered on the blockchain.
To list all assets, pass the empty string ""
for the lowerbound to start at the beginning of the list, and iterate as necessary.
lowerbound | the symbol of the first asset to include in the list. |
limit | the maximum number of assets to return (max: 100) |
Definition at line 192 of file wallet.cpp.
map< string, committee_member_id_type, std::less<> > graphene::wallet::wallet_api::list_committee_members | ( | const string & | lowerbound, |
uint32_t | limit | ||
) | const |
Lists all committee_members registered in the blockchain. This returns a list of all account names that own committee_members, and the associated committee_member id, sorted by name. This lists committee_members whether they are currently voted in or not.
Use the lowerbound
and limit parameters to page through the list. To retrieve all committee_members, start by setting lowerbound
to the empty string ""
, and then each iteration, pass the last committee_member name returned as the lowerbound
for the next list_committee_members()
call.
lowerbound | the name of the first committee_member to return. If the named committee_member does not exist, the list will start at the committee_member that comes after lowerbound |
limit | the maximum number of committee_members to return (max: 1000) |
Definition at line 912 of file wallet.cpp.
vector< account_object > graphene::wallet::wallet_api::list_my_accounts | ( | ) | const |
Lists all accounts controlled by this wallet. This returns a list of the full account objects for all accounts whose private keys we possess.
Definition at line 177 of file wallet.cpp.
map< string, witness_id_type, std::less<> > graphene::wallet::wallet_api::list_witnesses | ( | const string & | lowerbound, |
uint32_t | limit | ||
) | const |
Lists all witnesses registered in the blockchain. This returns a list of all account names that own witnesses, and the associated witness id, sorted by name. This lists witnesses whether they are currently voted in or not.
Use the lowerbound
and limit parameters to page through the list. To retrieve all witnesss, start by setting lowerbound
to the empty string ""
, and then each iteration, pass the last witness name returned as the lowerbound
for the next list_witnesss()
call.
lowerbound | the name of the first witness to return. If the named witness does not exist, the list will start at the witness that comes after lowerbound |
limit | the maximum number of witnesss to return (max: 1000) |
Definition at line 907 of file wallet.cpp.
bool graphene::wallet::wallet_api::load_wallet_file | ( | const string & | wallet_filename = "" | ) | const |
Loads a specified BitShares wallet.
The current wallet is closed before the new wallet is loaded.
set_wallet_filename()
wallet_filename | the filename of the wallet JSON file to load. If wallet_filename is empty, it reloads the existing wallet file |
Definition at line 1219 of file wallet.cpp.
void graphene::wallet::wallet_api::lock | ( | ) | const |
Locks the wallet immediately.
Definition at line 1254 of file wallet.cpp.
void graphene::wallet::wallet_api::network_add_nodes | ( | const vector< string > & | nodes | ) | const |
Definition at line 1076 of file wallet.cpp.
vector< variant > graphene::wallet::wallet_api::network_get_connected_peers | ( | ) | const |
Definition at line 1081 of file wallet.cpp.
string graphene::wallet::wallet_api::normalize_brain_key | ( | const string & | s | ) | const |
Transforms a brain key to reduce the chance of errors when re-entering the key from memory.
This takes a user-supplied brain key and normalizes it into the form used for generating private keys. In particular, this upper-cases all ASCII characters and collapses multiple spaces into one.
s | the brain key as supplied by the user |
Definition at line 748 of file wallet.cpp.
transaction graphene::wallet::wallet_api::preview_builder_transaction | ( | transaction_handle_type | handle | ) | const |
Show content of a transaction builder.
handle | handle of the transaction builder |
Definition at line 530 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::propose_builder_transaction | ( | transaction_handle_type | handle, |
const time_point_sec & | expiration = time_point::now() + fc::minutes(1) , |
||
uint32_t | review_period_seconds = 0 , |
||
bool | broadcast = true |
||
) | const |
Create a proposal containing the operations in a transaction builder (create a new proposal_create operation, then replace the transaction builder with the new operation), then sign the transaction and optionally broadcast to the network.
Note: this command is buggy because unable to specify proposer. It will be deprecated in a future release. Please use propose_builder_transaction2()
instead.
handle | handle of the transaction builder |
expiration | when the proposal will expire |
review_period_seconds | review period of the proposal in seconds |
broadcast | whether to broadcast the signed transaction to the network |
Definition at line 553 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::propose_builder_transaction2 | ( | transaction_handle_type | handle, |
const string & | account_name_or_id, | ||
const time_point_sec & | expiration = time_point::now() + fc::minutes(1) , |
||
uint32_t | review_period_seconds = 0 , |
||
bool | broadcast = true |
||
) | const |
Create a proposal containing the operations in a transaction builder (create a new proposal_create operation, then replace the transaction builder with the new operation), then sign the transaction and optionally broadcast to the network.
handle | handle of the transaction builder |
account_name_or_id | name or ID of the account who would pay fees for creating the proposal |
expiration | when the proposal will expire |
review_period_seconds | review period of the proposal in seconds |
broadcast | whether to broadcast the signed transaction to the network |
Definition at line 562 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::propose_fee_change | ( | const string & | proposing_account, |
const time_point_sec & | expiration_time, | ||
const variant_object & | changed_values, | ||
bool | broadcast = false |
||
) | const |
Propose a fee change.
proposing_account | The account paying the fee to propose the tx |
expiration_time | Timestamp specifying when the proposal will either take effect or expire. |
changed_values | Map of operation type to new fee. Operations may be specified by name or ID. The "scale" key changes the scale. All other operations will maintain current values. |
broadcast | true if you wish to broadcast the transaction |
Definition at line 1102 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::propose_parameter_change | ( | const string & | proposing_account, |
const time_point_sec & | expiration_time, | ||
const variant_object & | changed_values, | ||
bool | broadcast = false |
||
) | const |
Creates a transaction to propose a parameter change.
Multiple parameters can be specified if an atomic change is desired.
proposing_account | The account paying the fee to propose the tx |
expiration_time | Timestamp specifying when the proposal will either take effect or expire. |
changed_values | The values to change. All other chain parameters are filled in with default values |
broadcast | true if you wish to broadcast the transaction |
Definition at line 1092 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::publish_asset_feed | ( | const string & | publishing_account, |
const string & | symbol_or_id, | ||
const price_feed & | feed, | ||
bool | broadcast = false |
||
) | const |
Publishes a price feed for the named asset.
Price feed providers use this command to publish their price feeds for market-issued assets. A price feed is used to tune the market for a particular market-issued asset. For each value in the feed, the median across all committee_member feeds for that asset is calculated and the market for the asset is configured with the median of that value.
The feed object in this command contains three prices: a call price limit, a short price limit, and a settlement price. The call limit price is structured as (collateral asset) / (debt asset) and the short limit price is structured as (asset for sale) / (collateral asset). Note that the asset IDs are opposite to eachother, so if we're publishing a feed for USD, the call limit price will be CORE/USD and the short limit price will be USD/CORE. The settlement price may be flipped either direction, as long as it is a ratio between the market-issued asset and its collateral.
publishing_account | the account publishing the price feed |
symbol_or_id | the symbol or id of the asset whose feed we're publishing |
feed | the price_feed object containing the three prices making up the feed |
broadcast | true to broadcast the transaction on the network |
Definition at line 839 of file wallet.cpp.
void graphene::wallet::wallet_api::quit | ( | ) | const |
Quit from the wallet.
The current wallet will be closed and saved.
Definition at line 1224 of file wallet.cpp.
string graphene::wallet::wallet_api::read_memo | ( | const memo_data & | memo | ) | const |
Read a memo.
memo | JSON-encoded memo. |
Definition at line 1347 of file wallet.cpp.
blind_receipt graphene::wallet::wallet_api::receive_blind_transfer | ( | const string & | confirmation_receipt, |
const string & | opt_from, | ||
const string & | opt_memo | ||
) | const |
Given a confirmation receipt, this method will parse it for a blinded balance and confirm that it exists in the blockchain. If it exists then it will report the amount received and who sent it.
confirmation_receipt | a base58 encoded stealth confirmation |
opt_from | if not empty and the sender is a unknown public key, then the unknown public key will be given the label opt_from |
opt_memo | a self-defined label for this transfer to be saved in local wallet file |
Definition at line 1829 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::register_account | ( | const string & | name, |
const public_key_type & | owner, | ||
const public_key_type & | active, | ||
const string & | registrar_account, | ||
const string & | referrer_account, | ||
uint32_t | referrer_percent, | ||
bool | broadcast = false |
||
) | const |
Registers a third party's account on the blockckain.
This function is used to register an account for which you do not own the private keys. When acting as a registrar, an end user will generate their own private keys and send you the public keys. The registrar will use this function to register the account on behalf of the end user.
name | the name of the account, must be unique on the blockchain. Shorter names are more expensive to register. The rules are still in flux, but in general names of more than 8 characters with at least one digit will be cheap. |
owner | the owner key for the new account |
active | the active key for the new account |
registrar_account | the account which will pay the fee to register the user |
referrer_account | the account who is acting as a referrer, and may receive a portion of the user's transaction fees. This can be the same as the registrar_account if there is no referrer. |
referrer_percent | the percentage (0 - 100) of the new user's transaction fees not claimed by the blockchain that will be distributed to the referrer, the rest will be sent to the registrar. Will be multiplied by GRAPHENE_1_PERCENT when constructing the transaction. |
broadcast | true to broadcast the transaction on the network |
Definition at line 768 of file wallet.cpp.
void graphene::wallet::wallet_api::remove_builder_transaction | ( | transaction_handle_type | handle | ) | const |
Destroy a transaction builder.
handle | handle of the transaction builder |
Definition at line 572 of file wallet.cpp.
void graphene::wallet::wallet_api::replace_operation_in_builder_transaction | ( | transaction_handle_type | handle, |
uint32_t | operation_index, | ||
const operation & | new_op | ||
) | const |
Replace an operation in a transaction builder with a new operation.
handle | handle of the transaction builder |
operation_index | the index of the old operation in the builder to be replaced |
new_op | the new operation in JSON format |
Definition at line 517 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::reserve_asset | ( | const string & | from, |
const string & | amount, | ||
const string & | symbol_or_id, | ||
bool | broadcast = false |
||
) | const |
Burns an amount of given asset to its reserve pool.
This command burns an amount of given asset to reduce the amount in circulation.
from | the account containing the asset you wish to burn |
amount | the amount to burn, in nominal units |
symbol_or_id | the symbol or id of the asset to burn |
broadcast | true to broadcast the transaction on the network |
Definition at line 862 of file wallet.cpp.
void graphene::wallet::wallet_api::save_wallet_file | ( | const string & | wallet_filename = "" | ) | const |
Saves the current wallet to the given filename.
set_wallet_filename()
to make the filename persist. wallet_filename | the filename of the new wallet JSON file to create or overwrite. If wallet_filename is empty, save to the current filename. |
Definition at line 1229 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::sell_asset | ( | const string & | seller_account, |
const string & | amount_to_sell, | ||
const string & | symbol_or_id_to_sell, | ||
const string & | min_to_receive, | ||
const string & | symbol_or_id_to_receive, | ||
uint32_t | timeout_sec = 0 , |
||
bool | fill_or_kill = false , |
||
bool | broadcast = false |
||
) | const |
Place a limit order attempting to sell one asset for another.
Buying and selling are the same operation on BitShares. If you want to buy BTS with USD, you should sell USD for BTS.
The blockchain will attempt to sell the symbol_or_id_to_sell
for as much symbol_or_id_to_receive
as possible, as long as the price is at least min_to_receive
/ amount_to_sell
.
In addition to the transaction fees, market fees will apply as specified by the issuer of both the selling asset and the receiving asset as a percentage of the amount exchanged.
If either the selling asset or the receiving asset is whitelist restricted, the order will only be created if the seller is on the whitelist of the restricted asset type.
Market orders are matched in the order they are included in the block chain.
seller_account | the account providing the asset being sold, and which will receive the proceeds of the sale. |
amount_to_sell | the amount of the asset being sold to sell (in nominal units) |
symbol_or_id_to_sell | the symbol or id of the asset to sell |
min_to_receive | the minimum amount you are willing to receive in return for selling the entire amount_to_sell |
symbol_or_id_to_receive | the symbol or id of the asset you wish to receive |
timeout_sec | if the order does not fill immediately, this is the length of time the order will remain on the order books before it is cancelled and the un-spent funds are returned to the seller's account |
fill_or_kill | if true, the order will only be included in the blockchain if it is filled immediately. if false, an open order will be left on the books to fill any amount that cannot be filled immediately. |
broadcast | true to broadcast the transaction on the network |
Definition at line 1304 of file wallet.cpp.
string graphene::wallet::wallet_api::serialize_transaction | ( | const signed_transaction & | tx | ) | const |
Converts a signed_transaction in JSON form to its binary representation.
tx | the transaction to serialize |
Definition at line 490 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::set_desired_witness_and_committee_member_count | ( | const string & | account_to_modify, |
uint16_t | desired_number_of_witnesses, | ||
uint16_t | desired_number_of_committee_members, | ||
bool | broadcast = false |
||
) | const |
Set your vote for the number of witnesses and committee_members in the system.
Each account can voice their opinion on how many committee_members and how many witnesses there should be in the active committee_member/active witness list. These are independent of each other. You must vote your approval of at least as many committee_members or witnesses as you claim there should be (you can't say that there should be 20 committee_members but only vote for 10).
There are maximum values for each set in the blockchain parameters (currently defaulting to 1001).
This setting can be changed at any time. If your account has a voting proxy set, your preferences will be ignored.
account_to_modify | the name or id of the account to update |
desired_number_of_witnesses | desired number of active witnesses |
desired_number_of_committee_members | desired number of active committee members |
broadcast | true if you wish to broadcast the transaction |
Definition at line 1003 of file wallet.cpp.
asset graphene::wallet::wallet_api::set_fees_on_builder_transaction | ( | transaction_handle_type | handle, |
const string & | fee_asset = GRAPHENE_SYMBOL |
||
) | const |
Calculate and update fees for the operations in a transaction builder.
handle | handle of the transaction builder |
fee_asset | symbol or ID of an asset that to be used to pay fees |
Definition at line 525 of file wallet.cpp.
bool graphene::wallet::wallet_api::set_key_label | ( | const public_key_type & | key, |
const string & | label | ||
) | const |
These methods are used for stealth transfers This method can be used to set a label for a public key
key | a public key |
label | a user-defined string as label |
Definition at line 1409 of file wallet.cpp.
void graphene::wallet::wallet_api::set_password | ( | const string & | password | ) | const |
Sets a new password on the wallet.
The wallet must be either 'new' or 'unlocked' to execute this command.
When used in command line, if typed "set_password" without a password followed, the user will be prompted to input a password without echo.
password | a new password |
Definition at line 1277 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::set_voting_proxy | ( | const string & | account_to_modify, |
const optional< string > & | voting_account, | ||
bool | broadcast = false |
||
) | const |
Set the voting proxy for an account.
If a user does not wish to take an active part in voting, they can choose to allow another account to vote their stake.
Setting a vote proxy does not remove your previous votes from the blockchain, they remain there but are ignored. If you later null out your vote proxy, your previous votes will take effect again.
This setting can be changed at any time.
account_to_modify | the name or id of the account to update |
voting_account | the name or id of an account authorized to vote account_to_modify's stake, or null to vote your own stake |
broadcast | true if you wish to broadcast the transaction |
Definition at line 996 of file wallet.cpp.
void graphene::wallet::wallet_api::set_wallet_filename | ( | const string & | wallet_filename | ) | const |
Sets the wallet filename used for future writes.
This does not trigger a save, it only changes the default filename that will be used the next time a save is triggered.
wallet_filename | the new filename to use for future saves |
Definition at line 1012 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::settle_asset | ( | const string & | account_to_settle, |
const string & | amount_to_settle, | ||
const string & | symbol_or_id, | ||
bool | broadcast = false |
||
) | const |
Schedules a market-issued asset for automatic settlement.
Holders of market-issued assests may request a forced settlement for some amount of their asset. This means that the specified sum will be locked by the chain and held for the settlement period, after which time the chain will choose a margin posision holder and buy the settled asset using the margin's collateral. The price of this sale will be based on the feed price for the market-issued asset being settled. The exact settlement price will be the feed price at the time of settlement with an offset in favor of the margin position, where the offset is a blockchain parameter set in the asset's bitasset options.
account_to_settle | the name or id of the account owning the asset |
amount_to_settle | the amount of the asset to schedule for settlement |
symbol_or_id | the symbol or id of the asset to settle |
broadcast | true to broadcast the transaction on the network |
Definition at line 877 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::sign_builder_transaction | ( | transaction_handle_type | transaction_handle, |
bool | broadcast = true |
||
) | const |
Sign the transaction in a transaction builder and optionally broadcast to the network.
transaction_handle | handle of the transaction builder |
broadcast | whether to broadcast the signed transaction to the network |
Definition at line 535 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::sign_builder_transaction2 | ( | transaction_handle_type | transaction_handle, |
const vector< public_key_type > & | signing_keys = vector<public_key_type>() , |
||
bool | broadcast = true |
||
) | const |
Sign the transaction in a transaction builder and optionally broadcast to the network.
transaction_handle | handle of the transaction builder |
signing_keys | Keys that must be used when signing the transaction |
broadcast | whether to broadcast the signed transaction to the network |
Definition at line 541 of file wallet.cpp.
memo_data graphene::wallet::wallet_api::sign_memo | ( | const string & | from, |
const string & | to, | ||
const string & | memo | ||
) | const |
Sign a memo message.
from | the name or id of signing account, or a public key, or a label of a public key |
to | the name or id of receiving account, or a public key, or a label of a public key |
memo | text to sign |
Definition at line 1341 of file wallet.cpp.
signed_message graphene::wallet::wallet_api::sign_message | ( | const string & | signer, |
const string & | message | ||
) | const |
Sign a message using an account's memo key. The signature is generated as in https://github.com/xeroc/python-graphenelib/blob/d9634d74/graphenecommon/message.py#L64 .
signer | the name or id of signing account |
message | text to sign |
Definition at line 1353 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::sign_transaction | ( | const signed_transaction & | tx, |
bool | broadcast = false |
||
) | const |
Signs a transaction.
Given a fully-formed transaction that is only lacking signatures, this signs the transaction with the necessary keys and optionally broadcasts the transaction
tx | the transaction to be signed |
broadcast | true if you wish to broadcast the transaction |
Definition at line 1017 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::sign_transaction2 | ( | const signed_transaction & | tx, |
const vector< public_key_type > & | signing_keys = vector<public_key_type>() , |
||
bool | broadcast = true |
||
) | const |
Signs a transaction.
Given a fully-formed transaction that is only lacking signatures, this signs the transaction with the inferred necessary keys and the explicitly provided keys, and optionally broadcasts the transaction
tx | the transaction to be signed |
signing_keys | Keys that must be used when signing the transaction |
broadcast | true if you wish to broadcast the transaction |
Definition at line 1022 of file wallet.cpp.
brain_key_info graphene::wallet::wallet_api::suggest_brain_key | ( | ) | const |
Suggests a safe brain key to use for creating your account. create_account_with_brain_key()
requires you to specify a 'brain key', a long passphrase that provides enough entropy to generate cyrptographic keys. This function will suggest a suitably random string that should be easy to write down (and, with effort, memorize).
Definition at line 471 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::transfer | ( | const string & | from, |
const string & | to, | ||
const string & | amount, | ||
const string & | asset_symbol_or_id, | ||
const string & | memo, | ||
bool | broadcast = false |
||
) | const |
Transfer an amount from one account to another.
from | the name or id of the account sending the funds |
to | the name or id of the account receiving the funds |
amount | the amount to send (in nominal units – to send half of a BTS, specify 0.5) |
asset_symbol_or_id | the symbol or id of the asset to send |
memo | a memo to attach to the transaction. The memo will be encrypted in the transaction and readable for the receiver. There is no length limit other than the limit imposed by maximum transaction size, but transaction increase with transaction size |
broadcast | true to broadcast the transaction on the network |
Definition at line 794 of file wallet.cpp.
|
inline |
This method works just like transfer, except it always broadcasts and returns the transaction ID (hash) along with the signed transaction.
from | the name or id of the account sending the funds |
to | the name or id of the account receiving the funds |
amount | the amount to send (in nominal units – to send half of a BTS, specify 0.5) |
asset_symbol_or_id | the symbol or id of the asset to send |
memo | a memo to attach to the transaction. The memo will be encrypted in the transaction and readable for the receiver. There is no length limit other than the limit imposed by maximum transaction size, but transaction increase with transaction size |
Definition at line 793 of file wallet.hpp.
blind_confirmation graphene::wallet::wallet_api::transfer_from_blind | ( | const string & | from_blind_account_key_or_label, |
const string & | to_account_name_or_id, | ||
const string & | amount, | ||
const string & | asset_symbol_or_id, | ||
bool | broadcast = false |
||
) | const |
Transfers funds from a set of blinded balances to a public account balance.
from_blind_account_key_or_label | a public key in Base58 format or a label to transfer from |
to_account_name_or_id | name or ID of an account to transfer to |
amount | the amount to be transferred |
asset_symbol_or_id | symbol or ID of the asset to be transferred |
broadcast | true to broadcast the transaction on the network |
Definition at line 1495 of file wallet.cpp.
blind_confirmation graphene::wallet::wallet_api::transfer_to_blind | ( | const string & | from_account_name_or_id, |
const string & | asset_symbol_or_id, | ||
const vector< pair< string, string >> & | to_amounts, | ||
bool | broadcast = false |
||
) | const |
Transfers a public balance from from_account_name_or_id
to one or more blinded balances using a stealth transfer.
from_account_name_or_id | name or ID of an account to transfer from |
asset_symbol_or_id | symbol or ID of the asset to be transferred |
to_amounts | map from key or label to amount |
broadcast | true to broadcast the transaction on the network |
commitments must be in sorted order
Definition at line 1742 of file wallet.cpp.
void graphene::wallet::wallet_api::unlock | ( | const string & | password | ) | const |
Unlocks the wallet.
The wallet remain unlocked until the lock
is called or the program exits.
When used in command line, if typed "unlock" without a password followed, the user will be prompted to input a password without echo.
password | the password previously set with set_password() |
Definition at line 1265 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::update_asset | ( | const string & | symbol_or_id, |
const optional< string > & | new_issuer, | ||
const asset_options & | new_options, | ||
bool | broadcast = false |
||
) | const |
Update the core options on an asset. There are a number of options which all assets in the network use. These options are enumerated in the asset_object::asset_options struct. This command is used to update these options for an existing asset.
update_bitasset()
instead.symbol_or_id | the symbol or id of the asset to update |
new_issuer | if changing the asset's issuer, the name or id of the new issuer. null if you wish to remain the issuer of the asset |
new_options | the new asset_options object, which will entirely replace the existing options. |
broadcast | true to broadcast the transaction on the network |
Definition at line 810 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::update_asset_feed_producers | ( | const string & | symbol_or_id, |
const flat_set< string > & | new_feed_producers, | ||
bool | broadcast = false |
||
) | const |
Update the set of feed-producing accounts for a BitAsset.
BitAssets have price feeds selected by taking the median values of recommendations from a set of feed producers. This command is used to specify which accounts may produce feeds for a given BitAsset.
symbol_or_id | the symbol or id of the asset to update |
new_feed_producers | a list of account names or ids which are authorized to produce feeds for the asset. this list will completely replace the existing list |
broadcast | true to broadcast the transaction on the network |
Definition at line 832 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::update_asset_issuer | ( | const string & | symbol_or_id, |
const string & | new_issuer, | ||
bool | broadcast = false |
||
) | const |
Update the issuer of an asset Since this call requires the owner authority of the current issuer to sign the transaction, a separated operation is used to change the issuer. This call simplifies the use of this action.
symbol_or_id | the symbol or id of the asset to update |
new_issuer | if changing the asset's issuer, the name or id of the new issuer. |
broadcast | true to broadcast the transaction on the network |
Definition at line 818 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::update_bitasset | ( | const string & | symbol_or_id, |
const bitasset_options & | new_options, | ||
bool | broadcast = false |
||
) | const |
Update the options specific to a BitAsset.
BitAssets have some options which are not relevant to other asset types. This operation is used to update those options an an existing BitAsset.
symbol_or_id | the symbol or id of the asset to update, which must be a market-issued asset |
new_options | the new bitasset_options object, which will entirely replace the existing options. |
broadcast | true to broadcast the transaction on the network |
Definition at line 825 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::update_witness | ( | const string & | witness_name, |
const string & | url, | ||
const string & | block_signing_key, | ||
bool | broadcast = false |
||
) | const |
Update a witness object owned by the given account.
witness_name | The name of the witness's owner account. Also accepts the ID of the owner account or the ID of the witness. |
url | Same as for create_witness. The empty string makes it remain the same. |
block_signing_key | The new block signing public key. The empty string makes it remain the same. |
broadcast | true if you wish to broadcast the transaction. |
Definition at line 957 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::update_worker_votes | ( | const string & | account, |
const worker_vote_delta & | delta, | ||
bool | broadcast = false |
||
) | const |
Update your votes for workers
account | The account which will pay the fee and update votes. |
delta | {"vote_for" : [...], "vote_against" : [...], "vote_abstain" : [...]} |
broadcast | true if you wish to broadcast the transaction. |
Definition at line 949 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::upgrade_account | ( | const string & | account_name_or_id, |
bool | broadcast | ||
) | const |
Upgrades an account to prime status. This makes the account holder a 'lifetime member'.
account_name_or_id | the name or id of the account to upgrade |
broadcast | true to broadcast the transaction on the network |
Definition at line 1299 of file wallet.cpp.
bool graphene::wallet::wallet_api::verify_encapsulated_message | ( | const string & | message | ) | const |
Verify a message signed with sign_message, in its encapsulated form.
message | the complete encapsulated message string including separators and line feeds |
Definition at line 1380 of file wallet.cpp.
bool graphene::wallet::wallet_api::verify_message | ( | const string & | message, |
const string & | account, | ||
int32_t | block, | ||
const string & | msg_time, | ||
const fc::ecc::compact_signature & | sig | ||
) | const |
Verify a message signed with sign_message using the given account's memo key.
message | the message text |
account | the account name of the message |
block | the block number of the message |
msg_time | the timestamp of the message |
sig | the message signature |
Definition at line 1359 of file wallet.cpp.
bool graphene::wallet::wallet_api::verify_signed_message | ( | const signed_message & | message | ) | const |
Verify a message signed with sign_message
message | the signed_message structure containing message, meta data and signature |
Definition at line 1370 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::vote_for_committee_member | ( | const string & | voting_account, |
const string & | committee_member, | ||
bool | approve, | ||
bool | broadcast = false |
||
) | const |
Vote for a given committee_member.
An account can publish a list of all committee_members they approve of. This command allows you to add or remove committee_members from this list. Each account's vote is weighted according to the number of voting stake owned by that account at the time the votes are tallied.
voting_account | the name or id of the account who is voting with their stake |
committee_member | the name or id of the committee_member's owner account |
approve | true if you wish to vote in favor of that committee_member, false to remove your vote in favor of that committee_member |
broadcast | true if you wish to broadcast the transaction |
Definition at line 980 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::vote_for_witness | ( | const string & | voting_account, |
const string & | witness, | ||
bool | approve, | ||
bool | broadcast = false |
||
) | const |
Vote for a given witness.
An account can publish a list of all witnesses they approve of. This command allows you to add or remove witnesses from this list. Each account's vote is weighted according to the number of voting stake owned by that account at the time the votes are tallied.
voting_account | the name or id of the account who is voting with their stake |
witness | the name or id of the witness' owner account |
approve | true if you wish to vote in favor of that witness, false to remove your vote in favor of that witness |
broadcast | true if you wish to broadcast the transaction |
Definition at line 988 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::whitelist_account | ( | const string & | authorizing_account, |
const string & | account_to_list, | ||
account_whitelist_operation::account_listing | new_listing_status, | ||
bool | broadcast = false |
||
) | const |
Whitelist and blacklist accounts, primarily for transacting in whitelisted assets.
Accounts can freely specify opinions about other accounts, in the form of either whitelisting or blacklisting them. This information is used in chain validation only to determine whether an account is authorized to transact in an asset type which enforces a whitelist, but third parties can use this information for other uses as well, as long as it does not conflict with the use of whitelisted assets.
An asset which enforces a whitelist specifies a list of accounts to maintain its whitelist, and a list of accounts to maintain its blacklist. In order for a given account A to hold and transact in a whitelisted asset S, A must be whitelisted by at least one of S's whitelist_authorities and blacklisted by none of S's blacklist_authorities. If A receives a balance of S, and is later removed from the whitelist(s) which allowed it to hold S, or added to any blacklist S specifies as authoritative, A's balance of S will be frozen until A's authorization is reinstated.
authorizing_account | the account who is doing the whitelisting |
account_to_list | the account being whitelisted |
new_listing_status | the new whitelisting status |
broadcast | true to broadcast the transaction on the network |
Definition at line 893 of file wallet.cpp.
signed_transaction graphene::wallet::wallet_api::withdraw_vesting | ( | const string & | witness_name, |
const string & | amount, | ||
const string & | asset_symbol_or_id, | ||
bool | broadcast = false |
||
) | const |
Withdraw a vesting balance.
witness_name | The account name of the witness, also accepts account ID or vesting balance ID type. |
amount | The amount to withdraw. |
asset_symbol_or_id | The symbol or id of the asset to withdraw. |
broadcast | true if you wish to broadcast the transaction |
Definition at line 971 of file wallet.cpp.
fc::signal<void(bool)> graphene::wallet::wallet_api::lock_changed |
Definition at line 54 of file wallet.hpp.
std::shared_ptr<detail::wallet_api_impl> graphene::wallet::wallet_api::my |
Definition at line 55 of file wallet.hpp.