# Replacing Privy with Tomo
Firstly, I took a look at your github and I think this is totally doable in a short amount of time, and this will make you highly competitive with privy, offering developers another option for the exact thing privy does: they have 2.5m wallets created with 26m raised for this simple product.
Privy is just two things, authentication flows such as login with google, login with twitter, login with metamask and an embedded wallet(a private key custodied by privy with the ability to sign transactions). As a dapp developer, if I have these two features, I can swap out privy with tomo.
While they have a bit more features on top of this, such as plugins, building just the authentication flows and embedded wallet functionality would make it such that teams can and will switch from privy to tomo(privy doesn't have a userbase, just developers using the product, and this would be huge for tomo user acquisition as privy has created embedded 2.5 million wallets)
## What is needed
Privy provides this via a typescript sdk, and we just need the following four features:
### A PrivyProvider
A [provider](https://javascriptpatterns.vercel.app/patterns/react-patterns/provider-pattern) to wrap the app in such that we can call specific functions. This allows you to configure the appearance of the privy authentication modal, as well as supported login methods and supported chains
```
<PrivyProvider
appId={process.env.NEXT_PUBLIC_PRIVY_APP_ID!}
config={{
loginMethods: ['email', 'wallet', 'google', 'discord'],
appearance: {
theme: '#101014',
accentColor: '#676FFF',
},
defaultChain: edgelessTestnet,
supportedChains: [edgelessTestnet],
embeddedWallets: {
noPromptOnSignature: true, // defaults to false
waitForTransactionConfirmation: false, // just for better ux
},
}}
>
```
### Login/Logout Functionality

Privy has a hook that when triggered, makes this modal popup such that users can login with web2 wallets
```
export default function ConnectWalletButton() {
const { login } = usePrivy()
return (
<button
onClick={login}
type='button'
>
Login / Signup
</button>
)
}
```
### Wallets and Sending Transactions
Privy automatically creates a wallet for users that do not currently have a wallet. However, they use a private key which is a bit simpler than a 4337 wallet, which is what I am assuming tomo is using under the hood. However, we can still easily do this by creating the wallet upon the first transaction.
```
const { sendTransaction } = usePrivy()
await sendTransaction({
to: "0x4e31B7cfCBA387632de150E1C2eCC67B823B8069"
data: "0x0000000"
value: "1"
})
```
### Functions to check the status of wallets
Here are some hooks that are also needed to allow the application to check the status of the embedded tomo wallet
Check to make sure tomo is ready: https://docs.privy.io/guide/react/concepts/ready
Checking user authentication status to make sure they logged in via the privy modal: https://docs.privy.io/guide/react/authentication/status