@dynamic-labs-sdk/tempo, with its own network registry, separate from the EVM extensions on Adding EVM Extensions.
Earlier releases exposed Tempo from
@dynamic-labs-sdk/evm/tempo. That entry point no longer exists. Install @dynamic-labs-sdk/tempo and import the same helpers from it.Installation
viem as a peer dependency, so your app installs it alongside the SDK.
Add the extension
addTempoExtension registers Tempo’s network provider builder. Register it at module level next to your client, and enable Tempo in the Dynamic dashboard. The extension covers chain IDs 4217, 42429, and 42431. Calling it more than once has no effect after the first call.
Add embedded wallet support
Tempo embedded wallets come from the/waas entry point. addWaasTempoExtension registers the Tempo network provider and the embedded wallet provider, so it replaces addTempoExtension for apps that use embedded wallets.
Recognize Tempo accounts
Tempo wallet accounts havechain: 'TEMPO', so use isTempoWalletAccount rather than the EVM guard to pick them out of a user’s accounts.
isTempoNetworkProvider narrows a network provider to a TempoNetworkProvider, and isTempoWalletProvider does the same for wallet providers.
Read chain state
getTempoPublicClient resolves the active Tempo network from the Tempo registry and returns a viem PublicClient pointed at it.
Create a wallet client
An embedded Tempo wallet provider creates a viem WalletClient whose account signs messages and Tempo transactions. Look up the provider for the account, confirm it is a Tempo provider, and callcreateViemWalletClient. getWalletProviderFromWalletAccount comes from the core entry point and takes the Dynamic client as its second argument, so the example passes the dynamicClient you created earlier.
createViemWalletClient also accepts optional httpTransportConfig and viemWalletClientConfig values, which configure the viem transport and wallet client.
Send a TIP-20 transfer
sendTip20Transaction transfers a TIP-20 token with a viem WalletClient created from the Tempo wallet account. tokenAddress is required, and decimals defaults to 18, so pass the token’s own decimals for tokens such as 6 decimal stablecoins. amount is the human-readable amount, not the smallest unit.
- JavaScript
- React
createTempoWalletClient, the function defined in Create a wallet client, from your own module.
Transfer with transferAmount
The client function transferAmount works with embedded Tempo wallets as well. It takes the token as an object with address and decimals, and it requires the token because Tempo has no native currency to fall back on.
Send a Tempo transaction
sendTempoTransaction signs and sends a transaction that uses Tempo-only fields: batched calls, a fee token, a nonce key, or a validity window. Use it when a plain viem sendTransaction cannot express the transaction. It is available from the /waas entry point and works with embedded Tempo wallets.
- Send batched calls for
callsand how gas is estimated for a batch. - Pay fees with a TIP-20 token for
feeToken. - Use parallel nonce lanes for
nonceKey. - Set a validity window for
validAfterandvalidBefore. - Sign for a fee sponsor for
signTempoTransactionandawaitingFeePayer.
Parameters
Returns
Promise<{ transactionHash: string }>. The hash is returned once the signed transaction is submitted, not once it is included in a block. To wait for inclusion, pass the hash to waitForTransactionReceipt on the client from getTempoPublicClient.
Errors
TempoTransactionValidationError, InvalidTempoNetworkError, TempoTypedDataNotSupportedError, and the TempoTransactionRequest and TempoTransactionCall types are exported from @dynamic-labs-sdk/tempo/waas. TempoNativeTokenError is exported from @dynamic-labs-sdk/tempo.
Recognize Tempo networks
isTempoChainId tells you whether a chain ID belongs to Tempo, which is useful when your app routes a network ID to chain-specific behavior. TEMPO_CHAIN_IDS holds the same list if you need to enumerate it.