> ## Documentation Index
> Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Use parallel nonce lanes

> Send independent Tempo transactions at the same time by giving each one its own nonce lane with the nonceKey field

A normal account nonce makes transactions wait for each other: the second transaction cannot be included until the first one is. Tempo adds nonce lanes. Each `nonceKey` selects a separate lane with its own counter, so transactions on different lanes do not wait for each other. Use lanes when your app sends independent payments at the same time, such as paying several customers from one wallet.

## Send on separate lanes

Pass a different non-negative `nonceKey` to [`sendTempoTransaction`](/docs/javascript/reference/tempo/overview#send-a-tempo-transaction) for each transaction that must not queue behind another.

```typescript theme={"system"}
import { getTempoPublicClient } from '@dynamic-labs-sdk/tempo';
import type { TempoWalletAccount } from '@dynamic-labs-sdk/tempo';
import { sendTempoTransaction } from '@dynamic-labs-sdk/tempo/waas';
import { encodeFunctionData, erc20Abi, parseUnits } from 'viem';
import type { Hex } from 'viem';

const payInParallel = async (walletAccount: TempoWalletAccount) => {
  const tokenAddress = '0xTip20TokenAddress...';
  const recipients: Hex[] = ['0xFirstRecipient...', '0xSecondRecipient...'];

  const results = await Promise.all(
    recipients.map((recipient, index) =>
      sendTempoTransaction({
        calls: [
          {
            data: encodeFunctionData({
              abi: erc20Abi,
              args: [recipient, parseUnits('1.5', 6)],
              functionName: 'transfer',
            }),
            to: tokenAddress,
          },
        ],
        nonceKey: BigInt(index + 1),
        walletAccount,
      })
    )
  );

  const publicClient = await getTempoPublicClient({ walletAccount });

  return Promise.all(
    results.map(({ transactionHash }) =>
      publicClient.waitForTransactionReceipt({ hash: transactionHash as Hex })
    )
  );
};
```

Each transaction uses the next nonce on its own lane, so the two sends above can be signed and submitted together.

## How the nonce is chosen

When you leave `nonceKey` out, or pass `0n`, the transaction uses the account's regular nonce, which the SDK reads from the transaction count of the wallet address. For any other `nonceKey`, the SDK reads the lane's current nonce from the Tempo nonce manager contract at `0x4e4F4E4345000000000000000000000000000000` when it signs. A `nonce` you pass is ignored on those lanes, because the lane's counter is the source of the nonce.

The nonce is read at signing time, so two transactions signed on the same lane before the first is included receive the same nonce, and only one of them can land. Give every transaction that is in flight at the same time its own lane, and reuse a lane only after its previous transaction is included.

A `nonceKey` that is negative or not a bigint throws `TempoTransactionValidationError` before the wallet signs.

## Related

* [Send batched calls](/docs/javascript/reference/tempo/send-batched-calls) puts several calls in one transaction on a lane.
* [Set a validity window](/docs/javascript/reference/tempo/set-a-validity-window) limits when a transaction can be included.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.