transaction_group
- class pactsdk.transaction_group.TransactionGroup(transactions)
Bases:
object
A convenience class to make managing Algorand transactions groups easier.
- __init__(transactions)
Creates the TransactionGroup from an array of transactions by assigning a group id to each transaction.
- Parameters
transactions (
list
[Transaction
]) – A list of transactions to put in a group.- Raises
PactSdkError – If the list is empty (length 0) or if the group id was not assigned to the transactions due to e.g. a failure in the Algorand SDK.
- transactions: list[algosdk.transaction.Transaction]
A list of transactions in a group.
- sign(private_key)
Signs all the transactions in the group with the private key.
Using the private_key passed in assigns all the transactions stored internally for the transaction group.
- Parameters
private_key (
str
) – Sign the transactions with this private key.- Return type
list
[SignedTransaction
]- Returns
A list of encoded signed transactions as per the Transaction.sign from the Algorand sdk.
- property group_id
Returns The group id as a base64 encoded string.