Skip to main content

Recommended: JavaScript SDK with React Hooks

For new React apps, we recommend the JavaScript SDK with React Hooks (@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.
Tempo supports fee sponsorship through the awaitingFeePayer flag. This allows third parties to pay transaction fees on behalf of users, enabling gasless experiences.

How Fee Sponsorship Works

  1. User signs a transaction with awaitingFeePayer: true
  2. Transaction is sent to a fee payer service
  3. Fee payer adds their signature and broadcasts the transaction
  4. User’s transaction executes without paying gas fees

Transaction Expiry

When using fee sponsorship, you can set transaction validity windows:

Example: Creating a Sponsored Transaction

Fee Payer Service (Server-Side)

The fee payer service receives the signed transaction, adds its signature for the fee payment, and broadcasts:

Best Practices

  1. Set reasonable validity windows: Use validAfter and validBefore to prevent stale transactions from being broadcast
  2. Validate transactions server-side: Check transaction parameters before sponsoring
  3. Rate limit: Implement rate limiting on your fee payer service to prevent abuse
  4. Monitor spending: Track gas expenditure to manage sponsor costs
Last modified on June 25, 2026