BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
29 namespace graphene {
namespace wallet {
namespace detail {
38 return "RIPEMD160 " + hash.
str();
43 return "SHA1 " + hash.
str();
48 return "SHA256 " + hash.
str();
52 return "HASH160 " + hash.
str();
63 out <<
" (Fee: " << format_asset(a) <<
")";
69 std::string str_result = result.
visit(rprinter);
70 if( str_result !=
"" )
72 out <<
" result: " << str_result;
83 out <<
" -- Unlock wallet to see memo.";
87 "Memo is encrypted to a key ${to} or ${from} not in this wallet.",
88 (
"to", memo->
to)(
"from",memo->
from) );
89 if( wallet.
_keys.count(memo->
to) > 0 ) {
91 FC_ASSERT(my_key,
"Unable to recover private key to decrypt memo. Wallet may be corrupted.");
93 out <<
" -- Memo: " << outstr;
96 FC_ASSERT(my_key,
"Unable to recover private key to decrypt memo. Wallet may be corrupted.");
98 out <<
" -- Memo: " << outstr;
101 out <<
" -- could not decrypt memo";
110 if (preimage.size() == 0)
112 out <<
" with preimage \"";
114 auto flags = out.flags();
115 out << std::hex << setw(2) << setfill(
'0');
116 for (
size_t i = 0; i < std::min<size_t>(300, preimage.size()); i++)
119 if (preimage.size() > 300)
120 out <<
"...(truncated due to size)";
125 const std::string& redeemer,
const std::vector<char>& preimage,
128 out << redeemer <<
" redeemed HTLC with id "
139 <<
" received " << format_asset( op.
amount ) <<
" from blinded balance";
147 <<
" sent " << format_asset( op.
amount ) <<
" to " << op.
outputs.size()
148 <<
" blinded balance" << (op.
outputs.size()>1?
"s":
"");
155 out <<
"Transfer " << format_asset(op.
amount)
165 <<
" force-transfer " << format_asset(op.
amount)
174 out <<
"Create Account '" << op.
name <<
"' with registrar "
195 out <<
"User-Issue Asset ";
235 out <<
"Force-settle " << format_asset(op.
amount);
243 out <<
"Fund " << format_asset(op.
amount) <<
" into asset fee pool of "
252 out <<
"Claim " << format_asset(op.
amount_to_claim) <<
" from asset fee pool of "
263 vector<string> accounts;
287 out <<
"Adjust debt position with delta debt amount " << format_asset(op.
delta_debt)
296 out <<
"Create limit order to sell " << format_asset(op.
amount_to_sell)
313 out <<
"Pays " << format_asset(op.
pays) <<
" for " << format_asset(op.
receives)
315 <<
" as " << ( op.
is_maker ?
"maker" :
"taker" );
348 std::string database_id = result.
visit(rprinter);
350 out <<
"Create HTLC from " << from.name <<
" to " << to.name
351 <<
" with id " << database_id
356 if (pending_blocks > 0)
357 out <<
" (pending " <<
std::to_string(pending_blocks) <<
" blocks)";
369 return std::string(oid);
account_id_type issuer
This account must sign and pay the fee for this operation. Later, this account may update the asset.
The proposal_update_operation updates an existing transaction proposal.
Converts public account balance to a blinded or stealth balance.
asset amount
The amount of asset to transfer from from to to.
asset delta_debt
the amount of the debt to be paid off, may be negative to issue new debt
extended_asset_object get_asset(asset_id_type id) const
Used to generate a useful error report when an exception is thrown.
optional< memo_data > memo
string amount_to_pretty_string(share_type amount) const
Convert an asset to a textual representation with symbol, i.e. "123.45 USD".
std::string to_string(double)
fc::optional< fc::ecc::private_key > wif_to_key(const std::string &wif_key)
asset fee
paid for by publisher
const wallet_api_impl & _wallet
std::vector< char > preimage
std::string get_message(const fc::ecc::private_key &priv, const fc::ecc::public_key &pub) const
void print_redeem(const graphene::protocol::htlc_id_type &id, const std::string &redeemer, const std::vector< char > &preimage, const graphene::protocol::asset &op_fee) const
optional< bitasset_options > bitasset_opts
Options only available for BitAssets. MUST be non-null if and only if the asset is market-issued.
result_type operator()(const fc::sha256 &hash) const
void print_result() const
string symbol
Ticker symbol for this asset, i.e. "USD".
account_id_type registrar
This account pays the fee. Must be a lifetime member.
asset delta_collateral
the amount of collateral to add to the margin position
asset_id_type asset_to_update
static string to_string(const variant &v, output_formatting format=stringify_large_ints_and_doubles, uint32_t max_depth=DEFAULT_MAX_RECURSION_DEPTH)
account_object get_account(account_id_type id) const
std::string operator()(const graphene::protocol::void_result &x) const
result_type operator()(const fc::hash160 &hash) const
Update an existing account.
account_id_type referrer
This account receives a portion of the fee split between registrar and referrer. Must be a member.
account_id_type issuer
Must be asset_to_issue->asset_id->issuer.
result_type operator()(const fc::ripemd160 &hash) const
std::string operator()(const T &op) const
Converts blinded/stealth balance to a public account balance.
used to take an asset out of circulation, returning to the issuer
Update options common to all assets.
void print_preimage(const std::vector< char > &preimage) const
std::string print_memo(const fc::optional< graphene::protocol::memo_data > &memo) const
account_id_type from
Account to transfer asset from.
Transfers an amount of one asset from one account to another.
uint32_t last_irreversible_block_num
account_id_type to
Account to transfer asset to.
dynamic_global_property_object get_dynamic_global_properties() const
Update options specific to BitAssets.
asset amount
The amount of asset to transfer from from to to.
string symbol
The ticker symbol of this asset.
account_id_type to
Account to transfer asset to.
Publish price feeds for market-issued assets.
map< public_key_type, string > _keys
account_id_type from
Account to transfer asset from.
account_id_type issue_to_account
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
string name
The account's name. This name must be unique among all account names on the graph....
Update the set of feed-producing accounts for a BitAsset.
Schedules a market-issued asset for automatic settlement.
asset_id_type asset_to_update
optional< memo_data > memo
User provided data encrypted to the memo key of the "to" account.
flat_set< account_id_type > new_feed_producers
asset_id_type asset_to_update
account_id_type account
The account to update.
share_type amount
core asset
limit_order_id_type order
instructs the blockchain to attempt to sell one asset for another
Allows the issuer of an asset to transfer an asset from any account to any account if they have overr...
visitor::result_type visit(visitor &v)
proposal_id_type proposal
optional< memo_data > memo
User provided data encrypted to the memo key of the "to" account.
vector< blind_output > outputs
std::vector< char > preimage
result_type operator()(const fc::sha1 &hash) const
extension< additional_options_type > extensions
asset amount_to_claim
fee.asset_id must != asset_id
Transfers BTS from the fee pool of a specified asset back to the issuer's balance.
asset amount
Amount of asset to force settle. This must be a market-issued asset.