Scorum
|
Wallet Helpers. More...
Functions | |
operation | scorum::wallet::wallet_api::get_prototype_operation (const std::string &operation_type) |
std::string | scorum::wallet::wallet_api::serialize_transaction (const signed_transaction &tx) const |
annotated_signed_transaction | scorum::wallet::wallet_api::sign_transaction (const signed_transaction &tx, bool broadcast=false) |
void | scorum::wallet::wallet_api::set_transaction_expiration (uint32_t seconds) |
void | scorum::wallet::wallet_api::network_add_nodes (const std::vector< std::string > &nodes) |
std::vector< variant > | scorum::wallet::wallet_api::network_get_connected_peers () |
Wallet Helpers.
operation scorum::wallet::wallet_api::get_prototype_operation | ( | const std::string & | operation_type | ) |
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 scorum/chain/operations.hpp (e.g., "global_parameters_update_operation") |
Definition at line 1239 of file wallet.cpp.
void scorum::wallet::wallet_api::network_add_nodes | ( | const std::vector< std::string > & | nodes | ) |
std::vector< variant > scorum::wallet::wallet_api::network_get_connected_peers | ( | ) |
std::string scorum::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 1149 of file wallet.cpp.
void scorum::wallet::wallet_api::set_transaction_expiration | ( | uint32_t | seconds | ) |
Sets the amount of time in the futrue until a transaction expires.
Definition at line 2487 of file wallet.cpp.
annotated_signed_transaction scorum::wallet::wallet_api::sign_transaction | ( | const signed_transaction & | tx, |
bool | broadcast = false |
||
) |
Signs a transaction.
Given a fully-formed transaction that is only lacking signatrues, this signs the transaction with the necessary keys and optionally broadcasts the transaction
tx | the unsigned transaction |
broadcast | true if you wish to broadcast the transaction |
Definition at line 1230 of file wallet.cpp.