Send transactions
This guide will teach you how to send a single EVM transaction. Smart Wallets make it easy!
Prerequisites
- API key from your dashboard
- A funded Smart Wallet to cover gas fees (or a gas manager policy to sponsor gas)
Implementation
JavaScript
API
See the sendCalls SDK reference for full descriptions of the parameters used in the following example.
You can send transactions using the smart wallet client sendCalls action.
Advanced
Encoding function data
If you need to encode function data (instead of just sending value), it is easy to do so using Viem or Foundry.
JavaScript
API
In JavaScript, you can use Viem to encode function call data.
Usage with prepare calls
Instead of using the sendCalls abstraction, you can prepare and send calls using underlying methods. Usage of the capability will be the same as when using send calls. It is recommended to use prepareCalls if you want to inspect the prepared call prior to prompting the user for signature.
JavaScript
API
You can use smart wallet client actions to prepare, sign, and send transactions.
See the prepareCalls,
signPreparedCalls,
and sendPreparedCalls
SDK reference for full descriptions of the parameters used in the above example.
Next steps
Build more:
Troubleshooting: