DECENT
Functions
Authority and Validation

Functions

std::string graphene::app::database_api::get_transaction_hex (const signed_transaction &trx) const
 Get a hexdump of the serialized binary form of a transaction. More...
 
set< public_key_type > graphene::app::database_api::get_required_signatures (const signed_transaction &trx, const flat_set< public_key_type > &available_keys) const
 This API will take a partially signed transaction and a set of public keys that the owner has the ability to sign for and return the minimal subset of public keys that should add signatures to the transaction. More...
 
set< public_key_type > graphene::app::database_api::get_potential_signatures (const signed_transaction &trx) const
 This method will return the set of all public keys that could possibly sign for a given transaction. This call can be used by wallets to filter their set of public keys to just the relevant subset prior to calling get_required_signatures() to get the minimum subset. More...
 
bool graphene::app::database_api::verify_authority (const signed_transaction &trx) const
 Verifies required signatures of a transaction. More...
 
bool graphene::app::database_api::verify_account_authority (const string &name_or_id, const flat_set< public_key_type > &signers) const
 Verifies if the signers have enough authority to authorize an account. More...
 
processed_transaction graphene::app::database_api::validate_transaction (const signed_transaction &trx) const
 Validates a transaction against the current state without broadcasting it on the network. More...
 
fc::variants graphene::app::database_api::get_required_fees (const vector< operation > &ops, asset_id_type id) const
 For each operation calculates the required fee in the specified asset type. More...
 

Detailed Description

Function Documentation

set< public_key_type > graphene::app::database_api::get_potential_signatures ( const signed_transaction trx) const

This method will return the set of all public keys that could possibly sign for a given transaction. This call can be used by wallets to filter their set of public keys to just the relevant subset prior to calling get_required_signatures() to get the minimum subset.

Parameters
trxthe signed transaction

Definition at line 1518 of file database_api.cpp.

fc::variants graphene::app::database_api::get_required_fees ( const vector< operation > &  ops,
asset_id_type  id 
) const

For each operation calculates the required fee in the specified asset type.

Parameters
opsthe set of operations
idthe asset ID
Returns
the required fees

Definition at line 1628 of file database_api.cpp.

set< public_key_type > graphene::app::database_api::get_required_signatures ( const signed_transaction trx,
const flat_set< public_key_type > &  available_keys 
) const

This API will take a partially signed transaction and a set of public keys that the owner has the ability to sign for and return the minimal subset of public keys that should add signatures to the transaction.

Parameters
trxthe signed transaction
available_keysset of available public keys

Definition at line 1501 of file database_api.cpp.

std::string graphene::app::database_api::get_transaction_hex ( const signed_transaction trx) const

Get a hexdump of the serialized binary form of a transaction.

Parameters
trxthe signed transaction
Returns
hexadecimal string

Definition at line 1491 of file database_api.cpp.

processed_transaction graphene::app::database_api::validate_transaction ( const signed_transaction trx) const

Validates a transaction against the current state without broadcasting it on the network.

Parameters
trxthe signed transaction

Definition at line 1618 of file database_api.cpp.

bool graphene::app::database_api::verify_account_authority ( const string &  name_or_id,
const flat_set< public_key_type > &  signers 
) const

Verifies if the signers have enough authority to authorize an account.

Parameters
name_or_idthe name or id of the account
signersset of public keys
Returns
true if the signers have enough authority
Exceptions
account_does_not_exist_exception

Definition at line 1574 of file database_api.cpp.

bool graphene::app::database_api::verify_authority ( const signed_transaction trx) const

Verifies required signatures of a transaction.

Parameters
trxthe signed transaction
Returns
true if the trx has all of the required signatures, otherwise throws an exception
Exceptions
account_does_not_exist_exception,tx_missing_other_auth_exception,invalid_committee_approval_exception,tx_irrelevant_sig_exception

Definition at line 1551 of file database_api.cpp.