useWallet hook/composable/primitive provides two methods for signing Algorand transactions:
signTransactions- For directly signing transactionstransactionSigner- For use with transaction composers that accept analgosdk.TransactionSigner
signTransactions
ThesignTransactions method accepts transactions in multiple formats:
- An array of
algosdk.Transactionobjects - An array of encoded transactions (
Uint8Array) - An array of arrays of either of the above (for transaction groups)
Uint8Array | null, where null indicates an unsigned transaction.
For more information about constructing and sending transactions with the Algorand JavaScript SDK, see the JS SDK: Your First Transaction guide in the Algorand Developer Portal.
transactionSigner
ThetransactionSigner provides a typed algosdk.TransactionSigner that can be used with transaction composers. This is particularly useful when working with ABI method calls or when you need to compose multiple transactions.
With Atomic Transaction Composer
TheAtomicTransactionComposer (ATC) is the recommended way to build and execute groups of transactions, especially when working with smart contracts.
Here’s an example using ATC to combine an ABI method call with a payment transaction:
For more information, see the Atomic Transaction Composer guide in the Algorand Developer Portal.
With AlgoKit Utils
The most powerful way to interact with Algorand is using AlgoKit Utils’AlgorandClient. This class provides a unified interface for all Algorand functionality, including:
- Smart contract interactions via typed clients
- Transaction creation and composition
- Fee calculations and simulation