Skip to main content
The Universal Accounts SDK supports sending contract interactions, including payable transactions, through the createUniversalTransaction() method. In this example, we interact with a smart contract on the Base Mainnet that requires exactly 0.0000001 ETH to execute a checkIn() function. By specifying an expectTokens array, the SDK ensures the account has the necessary ETH on Base—even if the user’s assets are on other chains or in different tokens (e.g., USDC, USDT). The SDK will handle all additional required cross-chain routing and token conversion under the hood. Once the transaction is created, it will return a rootHash value representing the payload to be signed. You can then use a signer (e.g., Particle Auth) to sign this hash and broadcast it using sendTransaction(). The following code snippet shows how to use the Universal Accounts SDK to send a payable transaction:
The returned TransactionResult will include the transaction’s ID and metadata like token movements and fee breakdowns.

Next steps

Transaction Preview

Inspect fees and token movements before signing.

sendTransaction() Response

Full breakdown of the TransactionResult object.