Skip to content

transactions.transaction_composer

Classes

PaymentParamsParameters for a payment transaction.
AssetCreateParamsParameters for creating a new asset.
AssetConfigParamsParameters for configuring an existing asset.
AssetFreezeParamsParameters for freezing an asset.
AssetDestroyParamsParameters for destroying an asset.
OnlineKeyRegistrationParamsParameters for online key registration.
OfflineKeyRegistrationParamsParameters for offline key registration.
AssetTransferParamsParameters for transferring an asset.
AssetOptInParamsParameters for opting into an asset.
AssetOptOutParamsParameters for opting out of an asset.
AppCallParamsParameters for calling an application.
AppCreateSchemadict() -> new empty dictionary
AppCreateParamsParameters for creating an application.
AppUpdateParamsParameters for updating an application.
AppDeleteParamsParameters for deleting an application.
AppCallMethodCallParamsParameters for a regular ABI method call.
AppCreateMethodCallParamsParameters for an ABI method call that creates an application.
AppUpdateMethodCallParamsParameters for an ABI method call that updates an application.
AppDeleteMethodCallParamsParameters for an ABI method call that deletes an application.
BuiltTransactionsSet of transactions built by TransactionComposer.
TransactionComposerBuildResultResult of building transactions with TransactionComposer.
SendAtomicTransactionComposerResultsResults from sending an AtomicTransactionComposer transaction group.
TransactionComposerA class for composing and managing Algorand transactions.

Module Contents

algokit_utils.transactions.transaction_composer.ErrorTransformer

algokit_utils.transactions.transaction_composer.MethodCallParams

algokit_utils.transactions.transaction_composer.AppMethodCallTransactionArgument

algokit_utils.transactions.transaction_composer.TxnParams

algokit_utils.transactions.transaction_composer.calculate_extra_program_pages(approval: bytes | None, clear: bytes | None) → int

Calculate minimum number of extra_pages required for provided approval and clear programs

algokit_utils.transactions.transaction_composer.populate_app_call_resources(atc: algosdk.atomic_transaction_composer.AtomicTransactionComposer, algod: algosdk.v2client.algod.AlgodClient) → algosdk.atomic_transaction_composer.AtomicTransactionComposer

Populate application call resources based on simulation results.

  • Parameters:
    • atc – The AtomicTransactionComposer containing transactions
    • algod – Algod client for simulation
  • Returns: Modified AtomicTransactionComposer with populated resources

algokit_utils.transactions.transaction_composer.prepare_group_for_sending(atc: algosdk.atomic_transaction_composer.AtomicTransactionComposer, algod: algosdk.v2client.algod.AlgodClient, populate_app_call_resources: bool | None = None, cover_app_call_inner_transaction_fees: bool | None = None, additional_atc_context: AdditionalAtcContext | None = None) → algosdk.atomic_transaction_composer.AtomicTransactionComposer

Take an existing Atomic Transaction Composer and return a new one with changes applied to the transactions based on the supplied parameters to prepare it for sending. Please note, that before calling .execute() on the returned ATC, you must call .build_group().

  • Parameters:
    • atc – The AtomicTransactionComposer containing transactions
    • algod – Algod client for simulation
    • populate_app_call_resources – Whether to populate app call resources
    • cover_app_call_inner_transaction_fees – Whether to cover inner txn fees
    • additional_atc_context – Additional context for the AtomicTransactionComposer
  • Returns: Modified AtomicTransactionComposer ready for sending

algokit_utils.transactions.transaction_composer.send_atomic_transaction_composer(atc: algosdk.atomic_transaction_composer.AtomicTransactionComposer, algod: algosdk.v2client.algod.AlgodClient, *, max_rounds_to_wait: int | None = 5, skip_waiting: bool = False, suppress_log: bool | None = None, populate_app_call_resources: bool | None = None, cover_app_call_inner_transaction_fees: bool | None = None, additional_atc_context: AdditionalAtcContext | None = None) → SendAtomicTransactionComposerResults

Send an AtomicTransactionComposer transaction group.

Executes a group of transactions atomically using the AtomicTransactionComposer.

  • Parameters:
    • atc – The AtomicTransactionComposer instance containing the transaction group to send
    • algod – The Algod client to use for sending the transactions
    • max_rounds_to_wait – Maximum number of rounds to wait for confirmation, defaults to 5
    • skip_waiting – If True, don’t wait for transaction confirmation, defaults to False
    • suppress_log – If True, suppress logging, defaults to None
    • populate_app_call_resources – If True, populate app call resources, defaults to None
    • cover_app_call_inner_transaction_fees – If True, cover app call inner transaction fees, defaults to None
    • additional_atc_context – Additional context for the AtomicTransactionComposer
  • Returns: Results from sending the transaction group
  • Raises:
    • Exception – If there is an error sending the transactions
    • error – If there is an error from the Algorand node