graphenecommon.aio.transactionbuilder module

class graphenecommon.aio.transactionbuilder.ProposalBuilder(proposer, proposal_expiration=None, proposal_review=None, parent=None, *args, **kwargs)

Bases: graphenecommon.transactionbuilder.ProposalBuilder

Proposal Builder allows us to construct an independent Proposal that may later be added to an instance ot TransactionBuilder

Parameters:
  • proposer (str) – Account name of the proposing user
  • proposal_expiration (int) – Number seconds until the proposal is supposed to expire
  • proposal_review (int) – Number of seconds for review of the proposal
  • transactionbuilder.TransactionBuilder – Specify your own instance of transaction builder (optional)
  • blockchain_instance (instance) – Blockchain instance
broadcast()
get_raw()

Returns an instance of base “Operations” for further processing

json()

Return the json formated version of this proposal

class graphenecommon.aio.transactionbuilder.TransactionBuilder(tx={}, proposer=None, **kwargs)

Bases: graphenecommon.transactionbuilder.TransactionBuilder

This class simplifies the creation of transactions by adding operations and signers.

addSigningInformation(account, permission)

This is a private method that adds side information to a unsigned/partial transaction in order to simplify later signing (e.g. for multisig or coldstorage)

FIXME: Does not work with owner keys!

add_required_fees(ops, asset_id='1.3.0')

Auxiliary method to obtain the required fees for a set of operations. Requires a websocket connection to a witness node!

appendSigner(accounts, permission)

Try to obtain the wif key from the wallet by telling which account and permission is supposed to sign the transaction

broadcast()

Broadcast a transaction to the blockchain network

Parameters:tx (tx) – Signed transaction to broadcast
constructTx()

Construct the actual transaction and store it in the class’s dict store

get_block_params(use_head_block=False)

Auxiliary method to obtain ref_block_num and ref_block_prefix. Requires a websocket connection to a witness node!

json()

Show the transaction as plain json

list_operations()
sign()

Sign a provided transaction with the provided key(s)

Parameters:
  • tx (dict) – The transaction to be signed and returned
  • wifs (string) – One or many wif keys to use for signing a transaction. If not present, the keys will be loaded from the wallet as defined in “missing_signatures” key of the transactions.
verify_authority()

Verify the authority of the signed transaction