algokit_utils.transactions.transaction_sender
algokit_utils.transactions.transaction_sender
Section titled “algokit_utils.transactions.transaction_sender”Classes
Section titled “Classes”SendSingleTransactionResult | Base class for transaction results. |
|---|---|
SendSingleAssetCreateTransactionResult | Result of creating a new ASA (Algorand Standard Asset). |
SendAppTransactionResult | Result of an application transaction. |
SendAppUpdateTransactionResult | Result of updating an application. |
SendAppCreateTransactionResult | Result of creating a new application. |
AlgorandClientTransactionSender | Orchestrates sending transactions for AlgorandClient. |
Module Contents
Section titled “Module Contents”class SendSingleTransactionResult
Section titled “class SendSingleTransactionResult”Base class for transaction results.
Represents the result of sending a single transaction.
transaction : Transaction
Section titled “transaction : Transaction”The last transaction
confirmation : PendingTransactionResponse
Section titled “confirmation : PendingTransactionResponse”The last confirmation
group_id : str
Section titled “group_id : str”The group ID
tx_id : str | None = None
Section titled “tx_id : str | None = None”The transaction ID
tx_ids : list[str]
Section titled “tx_ids : list[str]”The full array of transaction IDs
transactions : list[Transaction]
Section titled “transactions : list[Transaction]”The full array of transactions
confirmations : list[PendingTransactionResponse]
Section titled “confirmations : list[PendingTransactionResponse]”The full array of confirmations
returns : list[ABIReturn] | None = None
Section titled “returns : list[ABIReturn] | None = None”The ABI return value if applicable
classmethod from_composer_result(result: SendTransactionComposerResults, *, is_abi: bool = False, index: int = -1) → Self
Section titled “classmethod from_composer_result(result: SendTransactionComposerResults, *, is_abi: bool = False, index: int = -1) → Self”class SendSingleAssetCreateTransactionResult
Section titled “class SendSingleAssetCreateTransactionResult”Bases: SendSingleTransactionResult
Result of creating a new ASA (Algorand Standard Asset).
Contains the asset ID of the newly created asset.
asset_id : int
Section titled “asset_id : int”The ID of the newly created asset
class SendAppTransactionResult
Section titled “class SendAppTransactionResult”Bases: SendSingleTransactionResult, Generic[ABIReturnT]
Result of an application transaction.
Contains the ABI return value if applicable.
abi_return : ABIReturnT | None = None
Section titled “abi_return : ABIReturnT | None = None”The ABI return value if applicable
class SendAppUpdateTransactionResult
Section titled “class SendAppUpdateTransactionResult”Bases: SendAppTransactionResult[ABIReturnT]
Result of updating an application.
Contains the compiled approval and clear programs.
compiled_approval : CompiledTeal | bytes | None = None
Section titled “compiled_approval : CompiledTeal | bytes | None = None”The compiled approval program
compiled_clear : CompiledTeal | bytes | None = None
Section titled “compiled_clear : CompiledTeal | bytes | None = None”The compiled clear state program
class SendAppCreateTransactionResult
Section titled “class SendAppCreateTransactionResult”Bases: SendAppUpdateTransactionResult[ABIReturnT]
Result of creating a new application.
Contains the app ID and address of the newly created application.
app_id : int
Section titled “app_id : int”The ID of the newly created application
app_address : str
Section titled “app_address : str”The address of the newly created application
class AlgorandClientTransactionSender(new_group: Callable[[], TransactionComposer], asset_manager: AssetManager, app_manager: AppManager, algod_client: AlgodClient)
Section titled “class AlgorandClientTransactionSender(new_group: Callable[[], TransactionComposer], asset_manager: AssetManager, app_manager: AppManager, algod_client: AlgodClient)”Orchestrates sending transactions for AlgorandClient.
Provides methods to send various types of transactions including payments, asset operations, and application calls.
Create a new transaction group.
- Returns: A new TransactionComposer instance
- Example:
sender = AlgorandClientTransactionSender(new_group, asset_manager, app_manager, algod_client)composer = sender.new_group()composer(PaymentParams(sender="sender", receiver="receiver", amount=AlgoAmount(algo=1)))composer.send()
payment(params: PaymentParams, send_params: SendParams | None = None) → SendSingleTransactionResult
Section titled “payment(params: PaymentParams, send_params: SendParams | None = None) → SendSingleTransactionResult”Send a payment transaction to transfer Algo between accounts.
-
Parameters:
- params – Payment transaction parameters
- send_params – Send parameters
-
Returns: Result of the payment transaction
-
Example:
result = algorand.send.payment(PaymentParams(sender="SENDERADDRESS",receiver="RECEIVERADDRESS",amount=AlgoAmount(algo=4),))# Advanced exampleresult = algorand.send.payment(PaymentParams(amount=AlgoAmount(algo=4),receiver="RECEIVERADDRESS",sender="SENDERADDRESS",close_remainder_to="CLOSEREMAINDERTOADDRESS",lease="lease",note="note",rekey_to="REKEYTOADDRESS",first_valid_round=1000,validity_window=10,extra_fee=AlgoAmount(micro_algo=1000),static_fee=AlgoAmount(micro_algo=1000),max_fee=AlgoAmount(micro_algo=3000),signer=transactionSigner), send_params=SendParams(max_rounds_to_wait=5,suppress_log=True,))
asset_create(params: AssetCreateParams, send_params: SendParams | None = None) → SendSingleAssetCreateTransactionResult
Section titled “asset_create(params: AssetCreateParams, send_params: SendParams | None = None) → SendSingleAssetCreateTransactionResult”Create a new Algorand Standard Asset.
-
Parameters:
- params – Asset creation parameters
- send_params – Send parameters
-
Returns: Result containing the new asset ID
-
Raises: ValueError – If the confirmation payload does not include an asset_id
-
Example:
result = algorand.send.asset_create(AssetCreateParams(sender="SENDERADDRESS",asset_name="ASSETNAME",unit_name="UNITNAME",total=1000,))# Advanced exampleresult = algorand.send.asset_create(AssetCreateParams(sender="CREATORADDRESS",total=100,decimals=2,asset_name="asset",unit_name="unit",url="url",metadata_hash="metadataHash",default_frozen=False,manager="MANAGERADDRESS",reserve="RESERVEADDRESS",freeze="FREEZEADDRESS",clawback="CLAWBACKADDRESS",lease="lease",note="note",# You wouldn't normally set this fieldfirst_valid_round=1000,validity_window=10,extra_fee=AlgoAmount(micro_algo=1000),static_fee=AlgoAmount(micro_algo=1000),# Max fee doesn't make sense with extraFee AND staticFee# already specified, but here for completenessmax_fee=AlgoAmount(micro_algo=3000),# Signer only needed if you want to provide one,# generally you'd register it with AlgorandClient# against the sender and not need to pass it insigner=transactionSigner), send_params=SendParams(max_rounds_to_wait=5,suppress_log=True,))
asset_config(params: AssetConfigParams, send_params: SendParams | None = None) → SendSingleTransactionResult
Section titled “asset_config(params: AssetConfigParams, send_params: SendParams | None = None) → SendSingleTransactionResult”Configure an existing Algorand Standard Asset.
- Parameters:
- params – Asset configuration parameters
- send_params – Send parameters
- Returns: Result of the configuration transaction
- Example:
result = algorand.send.asset_config(AssetConfigParams(sender="MANAGERADDRESS",asset_id=123456,manager="MANAGERADDRESS",reserve="RESERVEADDRESS",freeze="FREEZEADDRESS",clawback="CLAWBACKADDRESS",lease="lease",note="note",# You wouldn't normally set this fieldfirst_valid_round=1000,validity_window=10,extra_fee=AlgoAmount(micro_algo=1000),static_fee=AlgoAmount(micro_algo=1000),# Max fee doesn't make sense with extraFee AND staticFee# already specified, but here for completenessmax_fee=AlgoAmount(micro_algo=3000),# Signer only needed if you want to provide one,# generally you'd register it with AlgorandClient# against the sender and not need to pass it insigner=transactionSigner), send_params=SendParams(max_rounds_to_wait=5,suppress_log=True,))
asset_freeze(params: AssetFreezeParams, send_params: SendParams | None = None) → SendSingleTransactionResult
Section titled “asset_freeze(params: AssetFreezeParams, send_params: SendParams | None = None) → SendSingleTransactionResult”Freeze or unfreeze an Algorand Standard Asset for an account.
-
Parameters:
- params – Asset freeze parameters
- send_params – Send parameters
-
Returns: Result of the freeze transaction
-
Example:
result = algorand.send.asset_freeze(AssetFreezeParams(sender="MANAGERADDRESS",asset_id=123456,account="ACCOUNTADDRESS",frozen=True,))# Advanced exampleresult = algorand.send.asset_freeze(AssetFreezeParams(sender="MANAGERADDRESS",asset_id=123456,account="ACCOUNTADDRESS",frozen=True,lease="lease",note="note",# You wouldn't normally set this fieldfirst_valid_round=1000,validity_window=10,extra_fee=AlgoAmount(micro_algo=1000),static_fee=AlgoAmount(micro_algo=1000),# Max fee doesn't make sense with extraFee AND staticFee# already specified, but here for completenessmax_fee=AlgoAmount(micro_algo=3000),# Signer only needed if you want to provide one,# generally you'd register it with AlgorandClient# against the sender and not need to pass it insigner=transactionSigner), send_params=SendParams(max_rounds_to_wait=5,suppress_log=True,))
asset_destroy(params: AssetDestroyParams, send_params: SendParams | None = None) → SendSingleTransactionResult
Section titled “asset_destroy(params: AssetDestroyParams, send_params: SendParams | None = None) → SendSingleTransactionResult”Destroys an Algorand Standard Asset.
-
Parameters:
- params – Asset destruction parameters
- send_params – Send parameters
-
Returns: Result of the destroy transaction
-
Example:
result = algorand.send.asset_destroy(AssetDestroyParams(sender="MANAGERADDRESS",asset_id=123456,))# Advanced exampleresult = algorand.send.asset_destroy(AssetDestroyParams(sender="MANAGERADDRESS",asset_id=123456,lease="lease",note="note",# You wouldn't normally set this fieldfirst_valid_round=1000,validity_window=10,extra_fee=AlgoAmount(micro_algo=1000),static_fee=AlgoAmount(micro_algo=1000),# Max fee doesn't make sense with extraFee AND staticFee# already specified, but here for completenessmax_fee=AlgoAmount(micro_algo=3000),# Signer only needed if you want to provide one,# generally you'd register it with AlgorandClient# against the sender and not need to pass it insigner=transactionSigner), send_params=SendParams(max_rounds_to_wait=5,suppress_log=True,))
asset_transfer(params: AssetTransferParams, send_params: SendParams | None = None) → SendSingleTransactionResult
Section titled “asset_transfer(params: AssetTransferParams, send_params: SendParams | None = None) → SendSingleTransactionResult”Transfer an Algorand Standard Asset.
-
Parameters:
- params – Asset transfer parameters
- send_params – Send parameters
-
Returns: Result of the transfer transaction
-
Example:
result = algorand.send.asset_transfer(AssetTransferParams(sender="HOLDERADDRESS",asset_id=123456,amount=1,receiver="RECEIVERADDRESS",))# Advanced example (with clawback)result = algorand.send.asset_transfer(AssetTransferParams(sender="CLAWBACKADDRESS",asset_id=123456,amount=1,receiver="RECEIVERADDRESS",clawback_target="HOLDERADDRESS",# This field needs to be used with cautionclose_asset_to="ADDRESSTOCLOSETO",lease="lease",note="note",# You wouldn't normally set this fieldfirst_valid_round=1000,validity_window=10,extra_fee=AlgoAmount(micro_algo=1000),static_fee=AlgoAmount(micro_algo=1000),# Max fee doesn't make sense with extraFee AND staticFee# already specified, but here for completenessmax_fee=AlgoAmount(micro_algo=3000),# Signer only needed if you want to provide one,# generally you'd register it with AlgorandClient# against the sender and not need to pass it insigner=transactionSigner), send_params=SendParams(max_rounds_to_wait=5,suppress_log=True,))
asset_opt_in(params: AssetOptInParams, send_params: SendParams | None = None) → SendSingleTransactionResult
Section titled “asset_opt_in(params: AssetOptInParams, send_params: SendParams | None = None) → SendSingleTransactionResult”Opt an account into an Algorand Standard Asset.
-
Parameters:
- params – Asset opt-in parameters
- send_params – Send parameters
-
Returns: Result of the opt-in transaction
-
Example:
result = algorand.send.asset_opt_in(AssetOptInParams(sender="SENDERADDRESS",asset_id=123456,))# Advanced exampleresult = algorand.send.asset_opt_in(AssetOptInParams(sender="SENDERADDRESS",asset_id=123456,lease="lease",note="note",# You wouldn't normally set this fieldfirst_valid_round=1000,validity_window=10,extra_fee=AlgoAmount(micro_algo=1000),static_fee=AlgoAmount(micro_algo=1000),# Max fee doesn't make sense with extraFee AND staticFee# already specified, but here for completenessmax_fee=AlgoAmount(micro_algo=3000),# Signer only needed if you want to provide one,# generally you'd register it with AlgorandClient# against the sender and not need to pass it insigner=transactionSigner), send_params=SendParams(max_rounds_to_wait=5,suppress_log=True,))
asset_opt_out(params: AssetOptOutParams, send_params: SendParams | None = None, *, ensure_zero_balance: bool = True) → SendSingleTransactionResult
Section titled “asset_opt_out(params: AssetOptOutParams, send_params: SendParams | None = None, *, ensure_zero_balance: bool = True) → SendSingleTransactionResult”Opt an account out of an Algorand Standard Asset.
-
Parameters:
- params – Asset opt-out parameters
- send_params – Send parameters
- ensure_zero_balance – Check if account has zero balance before opt-out, defaults to True
-
Raises: ValueError – If account has non-zero balance or is not opted in
-
Returns: Result of the opt-out transaction
-
Example:
result = algorand.send.asset_opt_out(AssetOptOutParams(sender="SENDERADDRESS",creator="CREATORADDRESS",asset_id=123456,ensure_zero_balance=True,))# Advanced exampleresult = algorand.send.asset_opt_out(AssetOptOutParams(sender="SENDERADDRESS",asset_id=123456,creator="CREATORADDRESS",ensure_zero_balance=True,lease="lease",note="note",# You wouldn't normally set this fieldfirst_valid_round=1000,validity_window=10,extra_fee=AlgoAmount(micro_algo=1000),static_fee=AlgoAmount(micro_algo=1000),# Max fee doesn't make sense with extraFee AND staticFee# already specified, but here for completenessmax_fee=AlgoAmount(micro_algo=3000),# Signer only needed if you want to provide one,# generally you'd register it with AlgorandClient# against the sender and not need to pass it insigner=transactionSigner), send_params=SendParams(max_rounds_to_wait=5,suppress_log=True,))
app_create(params: AppCreateParams, send_params: SendParams | None = None) → SendAppCreateTransactionResult[ABIReturn]
Section titled “app_create(params: AppCreateParams, send_params: SendParams | None = None) → SendAppCreateTransactionResult[ABIReturn]”Create a new application.
-
Parameters:
- params – Application creation parameters
- send_params – Send parameters
-
Returns: Result containing the new application ID and address
-
Example:
result = algorand.send.app_create(AppCreateParams(sender="CREATORADDRESS",approval_program="TEALCODE",clear_state_program="TEALCODE",))# Advanced exampleresult = algorand.send.app_create(AppCreateParams(sender="CREATORADDRESS",approval_program="TEALCODE",clear_state_program="TEALCODE",schema=AppCreateSchema(global_ints=1,global_byte_slices=2,local_ints=3,local_byte_slices=4,),extra_program_pages=1,on_complete=OnApplicationComplete.OptIn,args=[b'some_bytes'],account_references=["ACCOUNT_1"],app_references=[123, 1234],asset_references=[12345],box_references=[...],lease=b'lease',note=b'note',# You wouldn't normally set this fieldfirst_valid_round=1000,validity_window=10,extra_fee=AlgoAmount(micro_algo=1000),static_fee=AlgoAmount(micro_algo=1000),# Max fee doesn't make sense with extra_fee AND static_fee# already specified, but here for completenessmax_fee=AlgoAmount(micro_algo=3000),# Signer only needed if you want to provide one,# generally you'd register it with AlgorandClient# against the sender and not need to pass it insigner=transaction_signer,), send_params=SendParams(max_rounds_to_wait=5,suppress_log=True,))
app_update(params: AppUpdateParams, send_params: SendParams | None = None) → SendAppUpdateTransactionResult[ABIReturn]
Section titled “app_update(params: AppUpdateParams, send_params: SendParams | None = None) → SendAppUpdateTransactionResult[ABIReturn]”Update an application.
- Parameters:
- params – Application update parameters
- send_params – Send parameters
- Returns: Result containing the compiled programs
- Example:
# Basic examplealgorand.send.app_update(AppUpdateParams(sender="CREATORADDRESS",approval_program="TEALCODE",clear_state_program="TEALCODE",))# Advanced examplealgorand.send.app_update(AppUpdateParams(sender="CREATORADDRESS",approval_program="TEALCODE",clear_state_program="TEALCODE",on_complete=OnApplicationComplete.UpdateApplication,args=[b'some_bytes'],account_references=["ACCOUNT_1"],app_references=[123, 1234],asset_references=[12345],box_references=[...],lease="lease",note="note",# You wouldn't normally set this fieldfirst_valid_round=1000,validity_window=10,extra_fee=AlgoAmount(micro_algo=1000),static_fee=AlgoAmount(micro_algo=1000),# Max fee doesn't make sense with extraFee AND staticFee# already specified, but here for completenessmax_fee=AlgoAmount(micro_algo=3000),# Signer only needed if you want to provide one,# generally you'd register it with AlgorandClient# against the sender and not need to pass it insigner=transactionSigner), send_params=SendParams(max_rounds_to_wait=5,suppress_log=True,))
app_delete(params: AppDeleteParams, send_params: SendParams | None = None) → SendAppTransactionResult[ABIReturn]
Section titled “app_delete(params: AppDeleteParams, send_params: SendParams | None = None) → SendAppTransactionResult[ABIReturn]”Delete an application.
- Parameters:
- params – Application deletion parameters
- send_params – Send parameters
- Returns: Result of the deletion transaction
- Example:
# Basic examplealgorand.send.app_delete(AppDeleteParams(sender="CREATORADDRESS",app_id=123456,))# Advanced examplealgorand.send.app_delete(AppDeleteParams(sender="CREATORADDRESS",on_complete=OnApplicationComplete.DeleteApplication,args=[b'some_bytes'],account_references=["ACCOUNT_1"],app_references=[123, 1234],asset_references=[12345],box_references=[...],lease="lease",note="note",# You wouldn't normally set this fieldfirst_valid_round=1000,validity_window=10,extra_fee=AlgoAmount(micro_algo=1000),static_fee=AlgoAmount(micro_algo=1000),# Max fee doesn't make sense with extraFee AND staticFee# already specified, but here for completenessmax_fee=AlgoAmount(micro_algo=3000),# Signer only needed if you want to provide one,# generally you'd register it with AlgorandClient# against the sender and not need to pass it insigner=transactionSigner,), send_params=SendParams(max_rounds_to_wait=5,suppress_log=True,))
app_call(params: AppCallParams, send_params: SendParams | None = None) → SendAppTransactionResult[ABIReturn]
Section titled “app_call(params: AppCallParams, send_params: SendParams | None = None) → SendAppTransactionResult[ABIReturn]”Call an application.
- Parameters:
- params – Application call parameters
- send_params – Send parameters
- Returns: Result containing any ABI return value
- Example:
# Basic examplealgorand.send.app_call(AppCallParams(sender="CREATORADDRESS",app_id=123456,))# Advanced examplealgorand.send.app_call(AppCallParams(sender="CREATORADDRESS",on_complete=OnApplicationComplete.OptIn,args=[b'some_bytes'],account_references=["ACCOUNT_1"],app_references=[123, 1234],asset_references=[12345],box_references=[...],lease="lease",note="note",# You wouldn't normally set this fieldfirst_valid_round=1000,validity_window=10,extra_fee=AlgoAmount(micro_algo=1000),static_fee=AlgoAmount(micro_algo=1000),# Max fee doesn't make sense with extraFee AND staticFee# already specified, but here for completenessmax_fee=AlgoAmount(micro_algo=3000),# Signer only needed if you want to provide one,# generally you'd register it with AlgorandClient# against the sender and not need to pass it insigner=transactionSigner,), send_params=SendParams(max_rounds_to_wait=5,suppress_log=True,))
app_create_method_call(params: AppCreateMethodCallParams, send_params: SendParams | None = None) → SendAppCreateTransactionResult[ABIReturn]
Section titled “app_create_method_call(params: AppCreateMethodCallParams, send_params: SendParams | None = None) → SendAppCreateTransactionResult[ABIReturn]”Call an application’s create method.
- Parameters:
- params – Method call parameters for application creation
- send_params – Send parameters
- Returns: Result containing the new application ID and address
- Example:
# Note: you may prefer to use `algorand.client` to get an app client# for more advanced functionality.from algokit_abi import arc56# Basic examplemethod = arc56.Method.from_signature("method(string)string")result = algorand.send.app_create_method_call(AppCreateMethodCallParams(sender="CREATORADDRESS",approval_program="TEALCODE",clear_state_program="TEALCODE",method=method,args=["arg1_value"],))created_app_id = result.app_id# Advanced examplemethod = arc56.Method.from_signature("method(string)string")result = algorand.send.app_create_method_call(AppCreateMethodCallParams(sender="CREATORADDRESS",method=method,args=["arg1_value"],approval_program="TEALCODE",clear_state_program="TEALCODE",schema=AppCreateSchema(global_ints=1,global_byte_slices=2,local_ints=3,local_byte_slices=4,),extra_program_pages=1,on_complete=OnApplicationComplete.OptIn,account_references=["ACCOUNT_1"],app_references=[123, 1234],asset_references=[12345],box_references=[...],lease=b'lease',note=b'note',# You wouldn't normally set this fieldfirst_valid_round=1000,validity_window=10,extra_fee=AlgoAmount(micro_algo=1000),static_fee=AlgoAmount(micro_algo=1000),# Max fee doesn't make sense with extra_fee AND static_fee# already specified, but here for completenessmax_fee=AlgoAmount(micro_algo=3000),# Signer only needed if you want to provide one,# generally you'd register it with AlgorandClient# against the sender and not need to pass it insigner=transaction_signer,), send_params=SendParams(max_rounds_to_wait=5,suppress_log=True,))
app_update_method_call(params: AppUpdateMethodCallParams, send_params: SendParams | None = None) → SendAppUpdateTransactionResult[ABIReturn]
Section titled “app_update_method_call(params: AppUpdateMethodCallParams, send_params: SendParams | None = None) → SendAppUpdateTransactionResult[ABIReturn]”Call an application’s update method.
- Parameters:
- params – Method call parameters for application update
- send_params – Send parameters
- Returns: Result containing the compiled programs
- Example:
# Basic examplemethod = arc56.Method.from_signature("updateMethod(string)string")result = algorand.send.app_update_method_call(AppUpdateMethodCallParams(sender="CREATORADDRESS",app_id=123,method=method,args=["new_value"],approval_program="TEALCODE",clear_state_program="TEALCODE",))# Advanced examplemethod = arc56.Method.from_signature("updateMethod(string,uint64)string")result = algorand.send.app_update_method_call(AppUpdateMethodCallParams(sender="CREATORADDRESS",app_id=456,method=method,args=["new_value", 42],approval_program="TEALCODE",clear_state_program="TEALCODE",account_references=["ACCOUNT1", "ACCOUNT2"],app_references=[789],asset_references=[101112],))
app_delete_method_call(params: AppDeleteMethodCallParams, send_params: SendParams | None = None) → SendAppTransactionResult[ABIReturn]
Section titled “app_delete_method_call(params: AppDeleteMethodCallParams, send_params: SendParams | None = None) → SendAppTransactionResult[ABIReturn]”Call an application’s delete method.
- Parameters:
- params – Method call parameters for application deletion
- send_params – Send parameters
- Returns: Result of the deletion transaction
- Example:
# Basic examplemethod = arc56.Method.from_signature("deleteMethod()void")result = algorand.send.app_delete_method_call(AppDeleteMethodCallParams(sender="CREATORADDRESS",app_id=123,method=method,))# Advanced examplemethod = arc56.Method.from_signature("deleteMethod(uint64)void")result = algorand.send.app_delete_method_call(AppDeleteMethodCallParams(sender="CREATORADDRESS",app_id=123,method=method,args=[1],account_references=["ACCOUNT1"],app_references=[456],))
app_call_method_call(params: AppCallMethodCallParams, send_params: SendParams | None = None) → SendAppTransactionResult[ABIReturn]
Section titled “app_call_method_call(params: AppCallMethodCallParams, send_params: SendParams | None = None) → SendAppTransactionResult[ABIReturn]”Call an application’s call method.
- Parameters:
- params – Method call parameters
- send_params – Send parameters
- Returns: Result containing any ABI return value
- Example:
# Basic examplemethod = arc56.Method.from_signature("callMethod(uint64)uint64")result = algorand.send.app_call_method_call(AppCallMethodCallParams(sender="CALLERADDRESS",app_id=123,method=method,args=[12345],))# Advanced examplemethod = arc56.Method.from_signature("callMethod(uint64,string)uint64")result = algorand.send.app_call_method_call(AppCallMethodCallParams(sender="CALLERADDRESS",app_id=123,method=method,args=[12345, "extra"],account_references=["ACCOUNT1"],asset_references=[101112],app_references=[789],))
online_key_registration(params: OnlineKeyRegistrationParams, send_params: SendParams | None = None) → SendSingleTransactionResult
Section titled “online_key_registration(params: OnlineKeyRegistrationParams, send_params: SendParams | None = None) → SendSingleTransactionResult”Register an online key.
-
Parameters:
- params – Key registration parameters
- send_params – Send parameters
-
Returns: Result of the registration transaction
-
Example:
# Basic example:params = OnlineKeyRegistrationParams(sender=”ACCOUNTADDRESS”,vote_key=”VOTEKEY”,selection_key=”SELECTIONKEY”,vote_first=1000,vote_last=2000,vote_key_dilution=10)result = algorand.send.online_key_registration(params)print(result.tx_id)# Advanced example:params = OnlineKeyRegistrationParams(sender=”ACCOUNTADDRESS”,vote_key=”VOTEKEY”,selection_key=”SELECTIONKEY”,vote_first=1000,vote_last=2100,vote_key_dilution=10,state_proof_key=b’’ * 64)result = algorand.send.online_key_registration(params)print(result.tx_id)
offline_key_registration(params: OfflineKeyRegistrationParams, send_params: SendParams | None = None) → SendSingleTransactionResult
Section titled “offline_key_registration(params: OfflineKeyRegistrationParams, send_params: SendParams | None = None) → SendSingleTransactionResult”Register an offline key.
-
Parameters:
- params – Key registration parameters
- send_params – Send parameters
-
Returns: Result of the registration transaction
-
Example:
# Basic example:params = OfflineKeyRegistrationParams(sender=”ACCOUNTADDRESS”,prevent_account_from_ever_participating_again=True)result = algorand.send.offline_key_registration(params)print(result.tx_id)# Advanced example:params = OfflineKeyRegistrationParams(sender=”ACCOUNTADDRESS”,prevent_account_from_ever_participating_again=True,note=b’Offline registration’)result = algorand.send.offline_key_registration(params)print(result.tx_id)