Skip to content

Use Tempo Transactions

Tempo Transactions are a new EIP-2718 transaction type, exclusively available on Tempo.

SDKs Support.

Transaction SDKs are available for TypeScript, Rust, Go, and Foundry.

If you're integrating with Tempo, we strongly recommend using Tempo Transactions, and not regular Ethereum transactions. Learn more about the benefits below, or follow the guide on issuance here.

Integration Guides

Integrating Tempo Transactions is easy and can be done quickly by a developer in multiple languages. See below for quick links to some of our guides.

LanguageSourceIntegration Time
TypeScripttempoxyz/tempo-ts< 1 hour
Rusttempo-alloy< 1 hour
Golangtempo-go< 1 hour
Pythonpytempo< 1 hour
Other LanguagesReach out to us! Specification is here and easy to build against.1-3 days

If you are an EVM smart contract developer, see the Tempo extension for Foundry.

Properties

Configurable Fee Tokens

A fee token is a permissionless TIP-20 token that can be used to pay fees on Tempo.

When a TIP-20 token is passed as the fee_token parameter in a transaction, Tempo's Fee AMM automatically facilitates conversion between the user's preferred fee token and the validator's preferred token.

example.ts
import { client } from './viem.config'
 
const alphaUsd = '0x20c0000000000000000000000000000000000001'
 
const receipt = await client.sendTransactionSync({
  data: '0xdeadbeef',
  feeToken: alphaUsd, 
  to: '0xcafebabecafebabecafebabecafebabecafebabe',
})

Fee Sponsorship

Fee sponsorship enables a third party (the fee payer) to pay transaction fees on behalf of the transaction sender.

The process uses dual signature domains: the sender signs their transaction, and then the fee payer signs over the transaction with a special "fee payer envelope" to commit to paying fees for that specific sender.

example.ts
import { client } from './viem.config'
 
const feePayer = privateKeyToAccount('0x...')
 
const receipt = await client.sendTransactionSync({
  data: '0xdeadbeef',
  feePayer, 
  to: '0xcafebabecafebabecafebabecafebabecafebabe',
})

Batch Calls

Batch calls enable multiple operations to be executed atomically within a single transaction. Instead of sending separate transactions for each operation, you can bundle multiple calls together using the calls parameter.

example.ts
import { client } from './viem.config'
 
const receipt = await client.sendTransactionSync({
  calls: [ 
    { 
      to: '0xcafebabecafebabecafebabecafebabecafebabe', 
      data: '0xdeadbeef0000000000000000000000000000000001', 
    }, 
    { 
      to: '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef', 
      data: '0xcafebabe0000000000000000000000000000000001', 
    }, 
    { 
      to: '0xcafebabecafebabecafebabecafebabecafebabe', 
      data: '0xdeadbeef0000000000000000000000000000000001', 
    }, 
  ] 
})

Access Keys

Access keys enable you to delegate signing authority from a primary account to a secondary key, such as device-bound non-extractable WebCrypto key. The primary account signs a key authorization that grants the access key permission to sign transactions on its behalf.

This authorization is then attached to the next transaction (that can be signed by either the primary or the access key), then all transactions thereafter can be signed by the access key.

example.ts
import { Account, WebCryptoP256 } from 'tempo.ts/viem'
import { client } from './viem.config'
 
// 1. Instantiate account.
const account = Account.fromSecp256k1('0x...')
 
// 2. Generate a non-extractable WebCrypto key pair & instantiate access key.
const keyPair = await WebCryptoP256.createKeyPair()
const accessKey = Account.fromWebCryptoP256(keyPair, {
  access: account,
})
 
// 3. Sign over key authorization with account.
const keyAuthorization = await account.signKeyAuthorization(accessKey)
 
// 4. Attach key authorization to (next) transaction.
const receipt = await client.sendTransactionSync({
  account: accessKey, // sign transaction with access key 
  data: '0xdeadbeef0000000000000000000000000000000001',
  keyAuthorization, 
  to: '0xcafebabecafebabecafebabecafebabecafebabe',
})

Concurrent Transactions

Concurrent transactions enable higher throughput by allowing multiple transactions from the same account to be sent in parallel without waiting for sequential nonce confirmation.

By using different nonce keys, you can submit multiple transactions simultaneously that don't conflict with each other, enabling parallel execution and significantly improved transaction throughput for high-activity accounts.

example.ts
import { client } from './viem.config'
 
const [receipt1, receipt2, receipt3] = await Promise.all([ 
  client.sendTransactionSync({
    data: '0xdeadbeef0000000000000000000000000000000001',
    to: '0xcafebabecafebabecafebabecafebabecafebabe',
  }),
  client.sendTransactionSync({
    data: '0xcafebabe0000000000000000000000000000000001',
    to: '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',
  }),
  client.sendTransactionSync({
    data: '0xdeadbeef0000000000000000000000000000000001',
    to: '0xcafebabecafebabecafebabecafebabecafebabe',
  }),
])
example.ts
import { client } from './viem.config'
 
const hash1 = await client.sendTransaction({
  data: '0xdeadbeef0000000000000000000000000000000001',
  nonceKey: 567n, 
  to: '0xcafebabecafebabecafebabecafebabecafebabe',
})
const hash2 = await client.sendTransaction({
  data: '0xdeadbeef0000000000000000000000000000000001',
  nonceKey: 789n, 
  to: '0xcafebabecafebabecafebabecafebabecafebabe',
})

Scheduled Transactions

Scheduled transactions allow you to sign a transaction in advance and specify a time window for when it can be executed onchain. By setting validAfter and validBefore timestamps, you define the earliest and latest times the transaction can be included in a block.

example.ts
import { client } from './viem.config'
 
const signature = await client.signTransaction({
  data: '0xdeadbeef0000000000000000000000000000000001',
  to: '0xcafebabecafebabecafebabecafebabecafebabe',
  validAfter: Math.floor(Number(new Date('2026-01-01')) / 1000), 
  validBefore: Math.floor(Number(new Date('2026-01-02')) / 1000), 
})