Viem

Viem is a viable alternative to ethers.js, addressing the quadrilemma of developer experience, stability, bundle size, and performance. With its modular and intuitive APIs, comprehensive documentation, and focus on type safety, viem provides developers with the tools they need to build robust Ethereum applications and libraries.

npm i viem

Demo dapps

In the same way we generated a random EOA wallet using Ethers.js, we will show this done with viem as well.

This is done with TransactionKit like this:

import { generatePrivateKey, privateKeyToAccount } from "viem/accounts";

const privateKey = generatePrivateKey();
const providerWallet = privateKeyToAccount(privateKey);

root.render(
  <StrictMode>
    <EtherspotTransactionKit
      provider={providerWallet} /* The random wallet we created above */
    >
      <App />
    </EtherspotTransactionKit>
  </StrictMode>
);

You can find more information on working with Viem here.